1.0.0 • Published 9 years ago

gulp-minstache v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

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