An example on how to build and structure a non-trivial JavaScript application.
http://ryanflorence.com/non-trivial-js/
First install these dependencies:
Node.js >= 0.4.9 NPM >= 1.0.0 PhantomJS
Then all other dependencies can be installed with npm like so:
$ npm install .
There is a watch
script in bin/watch
that will automatically watch the views directory and compile them to JavaScript functions to be included in the app. Start it up like so:
$ bin/watch
Or you can manually compile them
$ bin/compile-templates
Open up the app/test.html
in a browser, or from the command line with:
$ bin/runtests
RequireJS combines and minifies your scripts. Do it like so:
$ bin/build
Copyright (c) Ryan Florence
MIT Style license.