snapp-kit
v3.0.1
Published
A global build tool for Snapp Framework. Install once, use everywhere. Zero dependencies, zero configuration - just compile your JSX/TSX files to vanilla JavaScript.
Maintainers
Readme
Snapp Kit
A simple build tool for Snapp Framework
Live server powered by @compodoc/live-server
Table of Contents
What is Snapp Kit?
Snapp Kit compiles your JSX/TSX files to vanilla JavaScript. Simple as that.
What it does:
- Compiles JSX/TSX to JavaScript (powered by esbuild)
- Live server with auto-refresh during development
- Creates page templates instantly
What is Snapp? - A lightweight JavaScript framework. Learn more →
Quick Start
Recommended: Create New Project
npm create snapp-app my-app
cd my-app
npm run snappOpen http://localhost:9000 - Done!
Why use this?
- No global installation needed
- Everything set up automatically
- Works on any machine
- Perfect for team projects
Alternative: Global Installation
For personal projects or if you want the CLI everywhere:
npm install -g snapp-kit
# For macOS/Linux
sudo npm install -g snapp-kitThen use:
snapp create my-app
cd my-app
snapp build -WCommands
Note: If you used
npm create snapp-app, add prefix commands withnpx(e.g.,npx snapp build -W)
npm create snapp-app <name>
Creates a new project with everything configured.
npm create snapp-app my-project
cd my-project
npm run snappCreates:
my-project/
├── views/
│ └── index.jsx # Your JSX files
├── src/
│ ├── index.js
│ └── snapp.js # Snapp runtime
└── index.html # HTMLsnapp create <name>
Creates a new project
snapp create my-project
cd my-project
snapp build -Wsnapp page <name>
Generates a new page (HTML + JSX). Must be run inside project directory.
With npm create snapp-app:
cd my-project
npx snapp page contactWith global installation:
cd my-project
snapp page contactCreates:
contact.html- HTML templateviews/contact.jsx- JSX component
snapp build [options]
Compiles JSX/TSX files from views/ to src/.
snapp build # Build once
snapp build -W # Build + watch + live server
snapp build -M # Build minified
snapp build -W -M # Watch + live server + minifyOptions:
| Flag | Long | Description |
|------|------|-------------|
| -E | --entry | Project folder (e.g., -E MyApp) |
| -W | --watch | Watch mode + live server |
| -M | --minify | Minify output |
| -P | --port | Server port (default: 9000) |
When to use -E:
Inside your project - no -E needed:
cd my-project
snapp build -WOutside your project - use -E:
snapp build -W -E my-projectsnapp --version | snapp -V
Check installed version:
snapp --version
snapp -Vsnapp --help
Show all available commands:
snapp --helpHow It Works
Snapp Kit compiles your files using esbuild:
views/index.jsx → src/index.js
views/about.tsx → src/about.jsSupported files: .jsx, .tsx, .ts, .js
Watch mode:
- Starts live server on port 9000
- Rebuilds when files change
- Refreshes browser automatically
Troubleshooting
Command not found
For npm create:
npm --version # Check npm version (need 6+)For global installation:
npm install -g snapp-kit
snapp --versionFor npx commands:
cd my-project
npx snapp --versionFiles not compiling
Check your folder structure:
ls views/*.jsx # Verify files existThen build:
snapp build -WPort already in use
snapp build -W -P 8080Permission errors (Linux/Mac)
sudo npm install -g snapp-kitOr use npm create snapp-app (no sudo needed!)
Why Snapp Kit?
- Simple - One command to build
- Fast - Powered by esbuild
- Flexible - Global or per-project
Snapp Kit v3
