- 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
1003 B
1003 B
Insertr Development Quickstart
Project Structure
lib/- JavaScript library development (all Node.js tooling)insertr-cli/- Go CLI applicationdemo-site/- Static HTML demo site
Getting Started
Library Development
cd lib/
npm install
npm run serve # Start development server
npm run check # Validate setup
npm run demo # Show demo instructions
CLI Development
cd insertr-cli/
air # Hot reload development server
Build Everything
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.