gulp-minstache
v1.0.0
Published
Mini mustache compiling tool
Downloads
7
Maintainers
Readme
gulp-minstache
Render Minstache templates
Issues with the output should be reported on the Minstache issue tracker.
Install
$ npm install --save-dev gulp-minstache
Usage
src/greeting.html
<h1>Hello {{name}}</h1>
gulpfile.js
var gulp = require('gulp');
var template = require('gulp-minstache');
gulp.task('default', function () {
return gulp.src('src/greeting.html')
.pipe(template({name: 'World'}))
.pipe(gulp.dest('dist'));
});
dist/greeting.html
<h1>Hello World</h1>
API
template(data)
Render a template using the provided data
.
data
Type: Object
The data object used to populate the text.
License
MIT © Lucas Motta