Render/precompile Lo-Dash/Underscore templates
Issues with the output should be reported on the Lo-Dash issue tracker.
Install
$ npm install --save-dev gulp-template
Usage
src/greeting.html
Hello
gulpfile.js
const gulp = ;const template = ; gulp;
You can alternatively use gulp-data to inject the data:
const gulp = ;const template = ;const data = ; gulp;
dist/greeting.html
Hello Sindre
API
template(data, [options])
Render a template using the provided data
.
template.precompile([options])
Precompile a template for rendering dynamically at a later time.
data
Type: object
Data object used to populate the text.
options
Type: object
Related
- grunt-template - Grunt version
License
MIT © Sindre Sorhus