A modern static site generator for React applications with smart revalidation and hot reloading.
- β‘ Fast static site generation with React & TypeScript
- π WebSocket-based hot reloading during development
- π― Smart page revalidation - rebuild specific pages without full rebuilds
- π οΈ Simple CLI commands
- π¦ Optimized production builds with Vite
- Node.js >= 18.0.0
- npm >= 7.0.0
npm install @bouygues-telecom/staticjs -gcreate-staticjs-app
cd your-project
npm installnpm run devYour site will be available at http://localhost:3000
npm run build
npm run startProduction server runs at http://localhost:3456
static dev- Start development server with hot reloadstatic build- Build static site for productionstatic start- Serve built files in production mode
See CLI_USAGE.md for detailed command documentation.
your-project/
βββ src/
β βββ pages/ # Your pages
β βββ components/ # Reusable components
β βββ styles/ # Style files
β βββ app.tsx # App entry point
βββ _build/ # Generated static files
βββ static.config.ts # Configuration
Rebuild specific pages without a full rebuild:
curl -X POST http://localhost:3000/revalidate \
-H "Content-Type: application/json" \
-d '{ "paths": ["home.tsx", "about.tsx"] }'For contributors working on the StaticJS library itself:
npm install
node setup-dev.jsThis sets up the development environment with local package linking.
MIT
Built with β€οΈ by Bouygues Telecom