rincewind-precompile-transform

Browserify transform to inline and precompile rincewind templates

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.

// 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...})
}