Major Architecture Improvements: - Separate JavaScript library (lib/) with proper build system - Go CLI with embedded library using go:embed - Hot reload development with Air integration - Library + CLI build pipeline with npm run build Code Cleanup: - Remove obsolete assets (insertr-cli/assets/editor/) - Clean up package.json metadata and dependencies - Update .gitignore for new architecture - Remove unused 'marked' dependency New Documentation: - Add comprehensive TODO.md with feature gap analysis - Document critical gaps between prototype and current library - Create phased implementation plan for feature parity - Update DEVELOPMENT.md with hot reload workflow - Add LIBRARY.md documenting new architecture Hot Reload System: - Air watches both Go CLI and JavaScript library - Library changes trigger: rebuild → copy → CLI rebuild → serve - Seamless development experience across full stack Next Steps: - Current library is basic proof-of-concept (prompt() editing) - Archived prototype has production-ready features - Phase 1 focuses on professional forms and authentication - Phase 2 adds validation and content persistence
20 lines
493 B
Bash
Executable File
20 lines
493 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Rebuild library and copy to CLI assets
|
|
# Used by Air for hot reloading when library changes
|
|
|
|
set -e
|
|
|
|
echo "🔄 Library changed, rebuilding..."
|
|
|
|
# Build the library
|
|
cd ../lib
|
|
npm run build --silent
|
|
|
|
# Copy to CLI assets
|
|
echo "📁 Copying updated library to CLI assets..."
|
|
cp dist/* ../insertr-cli/pkg/content/assets/
|
|
|
|
# Get library version for confirmation
|
|
VERSION=$(node -e "console.log(require('./package.json').version)")
|
|
echo "✅ Library v$VERSION ready for CLI embedding" |