Skip to content

davidreghay/gulp-underscore-xform

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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]

About

gulp underscore template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%