refactor: consolidate all Node.js development into lib package

- Move scripts/ to lib/scripts/ and convert to ESM modules
- Consolidate dependencies: add live-server to lib/package.json
- Remove root package.json and node_modules split
- Preserve CLI integration via existing rebuild-library.sh
- Add development quickstart guide for new unified workflow
- Clean up outdated file references and duplicate assets
This commit is contained in:
2025-09-04 21:40:45 +02:00
parent 6fef293df3
commit c777fc92dd
18 changed files with 2539 additions and 2769 deletions

39
DEVELOPMENT_QUICKSTART.md Normal file
View File

@@ -0,0 +1,39 @@
# Insertr Development Quickstart
## Project Structure
- `lib/` - JavaScript library development (all Node.js tooling)
- `insertr-cli/` - Go CLI application
- `demo-site/` - Static HTML demo site
## Getting Started
### Library Development
```bash
cd lib/
npm install
npm run serve # Start development server
npm run check # Validate setup
npm run demo # Show demo instructions
```
### CLI Development
```bash
cd insertr-cli/
air # Hot reload development server
```
### Build Everything
```bash
cd lib/
npm run build:all # Builds library + CLI with embedded assets
```
## Architecture
The CLI embeds the JavaScript library at build time for distribution. During development:
- `lib/` contains the JavaScript library source and build tools
- Air (Go hot reload) watches `lib/src/` and rebuilds when library changes
- Demo site served from `lib/` package for unified development experience
All Node.js dependencies and scripts are now consolidated in the `lib/` package.