rincewind-precompile-transform
v1.5.0
Published
Browserify transform to inline and precompile rincewind templates
Downloads
9
Maintainers
Readme
rincewind-precompile-transform
Browserify transform to inline and precompile rincewind templates.
Finds all rincewind calls in source and loads the view and any subviews and replaces with a parsed JSON precompiled version.
Example
// entry.js
var View = require('rincewind')
var master = View(__dirname + '/master.html')
var views = {
'index': View(__dirname + '/index.html'),
'page': View(__dirname + '/page.html')
}
$ browserify entry.js -t rincewind-precompile-transform > output.js
// output.js
var View = require('rincewind')
var master = View({...compiled view...})
var views = {
'index': View({...compiled view...}),
'page': View({...compiled view...})
}