Skip to content

cfitz/coffee-script-project-template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoffeeScript Project Template

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

Pre-requisites

  1. Node.js, NPM, and CoffeeScript
  2. Java: For running the Closure compiler
  3. Python: For running Closure build scripts
  4. PhantomJS: For headless testing

Instructions

  1. Fork this repository and edit the name, etc on GitHub
  2. Clone locally
  3. Edit package.json
  4. Run npm install to install local dependencies
  5. Run git submodule update --init to load QUnit
  6. Run cake watch to automatically compile CoffeeScript to JavaScript
  7. Start coding
  8. Test using cake test:phantom
  9. Run cake build to compile and minify your code with Closure Compiler

Commands

  • cake build: Compiles and minifies JavaScript file for production use
  • cake watch: Automatically recompile CoffeeScript files to JavaScript
  • cake test:phantom: Run unit tests via headless WebKit
  • cake server: Run local webserver for testing (requires Python)
  • cake clean: Remove temporary and generated files
  • cake size: Report file size information for any scripts within build/
  • cake lint: Check lint with Coffee Lint

Future Ideas

  • Generate documentation (via CODO or similar)

Contributors

License

MIT

About

Build system for CoffeeScript projects compiled with Google's Closure Compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published