gulp-underscore-xform

1.1.0 • Public • Published

Introduction

This was forked from gulp-underscore-tpl. Credit is due to longjiarun for putting together the original plugin. I wrote this in order to have a way to output HTML templates transpiled to plain HTML files as part of a gulp task.

Install

npm install gulp-underscore-xform --save

Options

options see underscore template.

How to use

var template = require('gulp-underscore-xform')
gulp.task('xform', function() {
    return gulp.src('html/*.html')
        .pipe(template(/*options*/, {name: 'Sweeny'}))
        .pipe(gulp.dest('dist/html'))
});

Input

html/xform.html

<h1><%= name%></h1>

Output

dist/html/xform.html

<h1>Sweeny</h1>

LICENSE

MIT [http://www.opensource.org/licenses/mit-license.php]

Package Sidebar

Install

npm i gulp-underscore-xform

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

2.47 kB

Total Files

4

Last publish

Collaborators

  • davidreghay