Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An example on how to build and structure a non-trivial JavaScript application.

branch: master

Merge pull request #1 from kmiyashiro/patch-1

More accurate comment for baseUrl
latest commit 3cbc1703b4
Ryan Florence authored
Octocat-spinner-32 app Debugging file removed
Octocat-spinner-32 bin first
Octocat-spinner-32 config More accurate comment for baseUrl. It just so happens that require.js…
Octocat-spinner-32 lib first
Octocat-spinner-32 .gitignore Updated gitignore
Octocat-spinner-32 README.md first
Octocat-spinner-32 package.json first
README.md

Tasks!

An example on how to build and structure a non-trivial JavaScript application.

About / Demo

http://ryanflorence.com/non-trivial-js/

Development

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 .

Compiling templates

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

Running tests

Open up the app/test.html in a browser, or from the command line with:

$ bin/runtests

Optimize the app

RequireJS combines and minifies your scripts. Do it like so:

$ bin/build

License

Copyright (c) Ryan Florence

MIT Style license.

Something went wrong with that request. Please try again.