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.js
file 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
- 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 install
to install local dependencies - Run
git submodule update --init
to load QUnit - Run
cake watch
to automatically compile CoffeeScript to JavaScript - Start coding
- Test using
cake test:phantom
- Run
cake build
to 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)
MIT