UNPKG

superviewify

Version:

Browserify transform turning superviews.js template language to Googles incremental-dom

18 lines (13 loc) 427 B
var through = require('through2') var superviews = require('superviews.js') module.exports = function (file, options) { if (!/\.html$/i.test(file)) { return through() } return through(function (buf, enc, next) { var name = options && options.name ? options.name : 'description' var args = options && options.args ? options.args : 'data' this.push(superviews(buf, name, args, 'cjs')) next() }) }