rollup-plugin-hbsidom
v1.1.0
Published
A Rollup plugin for transforming handlebars templates to incremental-dom.
Downloads
4
Maintainers
Readme
rollup-plugin-hbsidom
Rollup plugin to compile handlebar templates to IncrementalDOM.
Install
npm i rollup-plugin-hbsidom -D
Usage
import { rollup } from 'rollup';
import hbsIdom from 'rollup-plugin-hbsidom';
rollup({
entry: 'main.js',
plugins: [
hbsIdom()
]
});
<p>Hello {{name}}</p>
import the template.
import template from 'template.hbs';
console.log(template({name:'world'}))
Example
import { rollup } from 'rollup';
import hbsIdom from 'rollup-plugin-hbsidom';
import babel from 'rollup-plugin-babel';
import { minify } from 'uglify-js';
rollup({
entry: 'main.js',
plugins: [
hbsIdom()
]
});
License
MIT ©