compile a directory of js templates into a single script, based on jammit's template compiler
A simple template compiler, based on Jammit and designed for node. Use it to take a directory of template files and stitch them together into a single script that can be loaded in the browser.
The api may change to include a .pipe interface, as well as a way to also load the templates into your node environment. Maybe a commandline interface? Who knows, it's version 0.0.1.
npm install stitchit
var stitchit = require'stitchit';// the following are optional, except pathvar options =path: '/some/path/to/templates'namespace: 'window.JST'compiler: '_.template'extension: 'jst'// if you are fine with all the defaults, just pass in the path as a stringoptions = '/some/path/to/templates';// stitchit creates a string you can serve directly to the browser, or write to a file, etcstitchitoptionsfswriteFile'/path/to/compiled/script'templates;;// alternatively, if you'd like everything done syncronously, don't pass a callbackvar templates = stitchitoptions;