Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Command line precompilation for underscore.js templates
JavaScript CoffeeScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
test
.gitignore
README.md
npm-debug.log
package.json
underscorec.js

README.md

underscorec

Command line precompilation for underscore.js templates.

Example

Given a file system like this:

views/
  layout.us
  home/
    index.us
    blah.us
  admin/
    dashboard.us

The following command:

underscorec views/ output.js

will compile the four underscore templates into the file output.js. The views are attached to a global templates object and named according to their path:

  • templates[layout]
  • templates[home/index]
  • templates[home/blah]
  • templates[admin/dashboard]

Testing

mocha --compilers coffee:coffee-script test/fs_tests.coffee

Something went wrong with that request. Please try again.