Giter Club home page Giter Club logo

coffee-script-project-template's Introduction

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
  • Generate Source Map for the final compiled output
  • Outputs Source Map for compiled CoffeeScript for debugging while testing

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)
  • Support UglifyJS as well as Closure Compiler
  • Use CommonJS/AMD-style support from Closure Compiler to do something awesome

Contributors

License

MIT

coffee-script-project-template's People

Contributors

fortes avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.