This document shows what the helper script looks like in action.
./scripts/excel-dev-helper.sh listOutput:
╔════════════════════════════════════════════════════════════╗
║ Available Projects
╚════════════════════════════════════════════════════════════╝
[1] my-excel-project
→ TypeScript Excel Add-in
./scripts/excel-dev-helper.sh infoOutput:
[INFO] Checking prerequisites...
[!] Node.js not found
[!] npm not found
[✓] Git 2.51.1
[!] Node.js is required for Excel development
To install Node.js:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
Or run: ./scripts/excel-dev-helper.sh install-node
╔════════════════════════════════════════════════════════════╗
║ Development Environment Information
╚════════════════════════════════════════════════════════════╝
Node.js:
npm:
Git: 2.51.1
TypeScript: Not installed globally
Working Directory: /workspaces/typescript-excel-devcontainer
Projects Directory: ./projects/
./scripts/excel-dev-helper.sh helpOutput:
╔════════════════════════════════════════════════════════════╗
║ Quick Start Guide
╚════════════════════════════════════════════════════════════╝
1. Create a new project:
./scripts/excel-dev-helper.sh create my-excel-app
2. Start development server:
./scripts/excel-dev-helper.sh start my-excel-app
3. Build for production:
./scripts/excel-dev-helper.sh build my-excel-app
4. Run tests:
./scripts/excel-dev-helper.sh test my-excel-app
5. Interactive menu:
./scripts/excel-dev-helper.sh
Common npm commands (inside project directory):
npm run dev-server - Start dev server with hot reload
npm run build - Production build
npm run build:dev - Development build
npm test - Run tests
npm run lint - Check code quality
npm run format - Format code
./scripts/excel-dev-helper.shOutput:
[INFO] Checking prerequisites...
[!] Node.js not found
[!] npm not found
[✓] Git 2.51.1
[!] Node.js is required for Excel development
To install Node.js:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
Or run: ./scripts/excel-dev-helper.sh install-node
╔════════════════════════════════════════════════════════════╗
║ TypeScript Excel Development Helper
╚════════════════════════════════════════════════════════════╝
1. Create New Project
2. List Projects
3. Start Dev Server
4. Build Project
5. Run Tests
6. Install Node.js
7. Install Global Tools
8. Environment Info
9. Quick Start Guide
0. Exit
Select option [0-9]: _
./scripts/excel-dev-helper.sh install-nodeExpected Output:
[INFO] Checking prerequisites...
[!] Node.js not found
[!] npm not found
[✓] Git 2.51.1
╔════════════════════════════════════════════════════════════╗
║ Installing Node.js 20
╚════════════════════════════════════════════════════════════╝
[INFO] Adding NodeSource repository...
[INFO] Installing Node.js...
[✓] Node.js installed: v20.x.x
[✓] npm installed: 10.x.x
./scripts/excel-dev-helper.sh installExpected Output:
[INFO] Checking prerequisites...
[✓] Node.js v20.x.x
[✓] npm 10.x.x
[✓] Git 2.51.1
[✓] All prerequisites satisfied
╔════════════════════════════════════════════════════════════╗
║ Installing Global TypeScript Tools
╚════════════════════════════════════════════════════════════╝
[INFO] Installing TypeScript and build tools...
[INFO] Installing Office.js development tools...
[✓] Global tools installed
./scripts/excel-dev-helper.sh create my-excel-calculatorExpected Output:
[INFO] Checking prerequisites...
[✓] Node.js v20.x.x
[✓] npm 10.x.x
[✓] Git 2.51.1
[✓] All prerequisites satisfied
╔════════════════════════════════════════════════════════════╗
║ Creating Project: my-excel-calculator
╚════════════════════════════════════════════════════════════╝
[INFO] Setting up project: my-excel-calculator
[INFO] Checking prerequisites...
[✓] All prerequisites are installed.
[INFO] Creating project structure for my-excel-calculator...
[✓] Project structure created.
[INFO] Initializing package.json...
[✓] package.json created.
[INFO] Copying configuration files...
[✓] tsconfig.json copied.
[✓] webpack.config.js copied.
[✓] jest.config.js copied.
[✓] .prettierrc copied.
[INFO] Creating basic source files...
[✓] Basic source files created.
[INFO] Installing dependencies...
[✓] Dependencies installed successfully.
[INFO] Creating README.md...
[✓] README.md created.
[✓] Project setup complete!
[INFO] To start developing:
[INFO] cd ./projects/my-excel-calculator
[INFO] npm run dev-server
[✓] Project created at: ./projects/my-excel-calculator
./scripts/excel-dev-helper.sh start my-excel-calculatorExpected Output:
[INFO] Checking prerequisites...
[✓] Node.js v20.x.x
[✓] npm 10.x.x
[✓] Git 2.51.1
[✓] All prerequisites satisfied
╔════════════════════════════════════════════════════════════╗
║ Starting Dev Server: my-excel-calculator
╚════════════════════════════════════════════════════════════╝
[✓] Starting development server on port 3000...
> my-excel-calculator@1.0.0 dev-server
> webpack serve --mode development --open
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:3000/
<i> [webpack-dev-server] On Your Network (IPv4): http://172.x.x.x:3000/
<i> [webpack-dev-server] Content not from webpack is served from './dist' directory
asset bundle.js 1.2 MiB [emitted] (name: main)
webpack 5.x.x compiled successfully in 1234 ms
./scripts/excel-dev-helper.sh build my-excel-calculatorExpected Output:
[INFO] Checking prerequisites...
[✓] Node.js v20.x.x
[✓] npm 10.x.x
[✓] Git 2.51.1
[✓] All prerequisites satisfied
╔════════════════════════════════════════════════════════════╗
║ Building Project: my-excel-calculator (production)
╚════════════════════════════════════════════════════════════╝
> my-excel-calculator@1.0.0 build
> webpack --mode production
asset bundle.js 234 KiB [emitted] [minimized] (name: main)
webpack 5.x.x compiled successfully in 2345 ms
[✓] Build complete: ./projects/my-excel-calculator/dist/
./scripts/excel-dev-helper.sh test my-excel-calculatorExpected Output:
[INFO] Checking prerequisites...
[✓] Node.js v20.x.x
[✓] npm 10.x.x
[✓] Git 2.51.1
[✓] All prerequisites satisfied
╔════════════════════════════════════════════════════════════╗
║ Running Tests: my-excel-calculator
╚════════════════════════════════════════════════════════════╝
> my-excel-calculator@1.0.0 test
> jest
PASS tests/index.test.ts
Utility Functions
✓ formatCellValue should format string values (2 ms)
✓ formatCellValue should format number values (1 ms)
✓ isValidRange should validate range objects (1 ms)
Test Suites: 1 passed, 1 total
Tests: 3 passed, 3 total
Snapshots: 0 total
Time: 1.234 s
Ran all test suites.
The script uses colors for clarity:
- [INFO] - Blue - Informational messages
- [✓] - Green - Success messages
- [!] - Yellow - Warnings
- [✗] - Red - Error messages
- Headers - Purple - Section headers
- Options - Cyan - Menu options and highlights
./scripts/excel-dev-helper.sh infoCheck your environment before doing anything else.
./scripts/excel-dev-helper.shThe menu helps you discover all available options.
./scripts/excel-dev-helper.sh start my-appOnce you know what you need, direct commands are faster.
./scripts/excel-dev-helper.sh listSee all your projects and their descriptions.
./scripts/excel-dev-helper.sh helpQuick reference for common commands.
- EXCEL_DEV_QUICKSTART.md - Quick start guide
- docs/excel-dev-helper-guide.md - Complete documentation
- HELPER_SCRIPT_SUMMARY.md - Feature summary
Ready to start building Excel Add-ins! 🚀