gulp-minstache

Mini mustache compiling tool

Usage no npm install needed!

<script type="module">
  import gulpMinstache from 'https://cdn.skypack.dev/gulp-minstache';
</script>

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