rincewind-precompile-transform

Browserify transform to inline and precompile rincewind templates

npm install rincewind-precompile-transform
6 downloads in the last week
6 downloads in the last month

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.

NPM

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...})
}
npm loves you