Project template for client-side JavaScript projects written in CoffeeScript and compiled with Google's Closure Compiler. Features include:
- Watch CoffeeScript files for changes and automatically compile to JavaScript
- Generate
deps.jsfile so Closure can manage script dependencies - Output CoffeeScript compilation errors to browser while developing
- Compile scripts using Closure's Advanced Compilation mode
- Write tests using QUnit
- Headless testing via PhantomJS
- Check lint with Coffee Lint
- Run local webserver for development
- Generate Source Map for the final compiled output
- Outputs Source Map for compiled CoffeeScript for debugging while testing
- Node.js, NPM, and CoffeeScript
- Java: For running the Closure compiler
- Python: For running Closure build scripts
- PhantomJS: For headless testing
- Fork this repository and edit the name, etc on GitHub
- Clone locally
- Edit
package.json - Run
npm installto install local dependencies - Run
git submodule update --initto load QUnit - Run
cake watchto automatically compile CoffeeScript to JavaScript - Start coding
- Test using
cake test:phantom - Run
cake buildto compile and minify your code with Closure Compiler
cake build: Compiles and minifies JavaScript file for production usecake watch: Automatically recompile CoffeeScript files to JavaScriptcake test:phantom: Run unit tests via headless WebKitcake server: Run local webserver for testing (requires Python)cake clean: Remove temporary and generated filescake size: Report file size information for any scripts withinbuild/cake lint: Check lint with Coffee Lint
- Generate documentation (via CODO or similar)
- Support UglifyJS as well as Closure Compiler
- Use CommonJS/AMD-style support from Closure Compiler to do something awesome
MIT