gulp-template-ts
Render/precompile Lo-Dash/Underscore templates
Issues with the output should be reported on the Lo-Dash issue tracker.
Install
$ npm install --save-dev gulp-template-ts
Usage
src/greeting.html
Hello
gulpfile.ts
;; gulp.task'default',gulp.src'src/greeting.html' .pipetemplate .pipegulp.dest'dist';
You can alternatively use gulp-data to inject the data:
;;; gulp.task'default',gulp.src'src/greeting.html' .pipedata .pipetemplate .pipegulp.dest'dist';
dist/greeting.html
Hello Mathias
API
template(data, [options])
Render a template using the provided data
.
template.precompile([options])
Precompile a template for rendering dynamically at a later time.
data
Type: object
Data object used to populate the text.
options
Type: object
Related
- grunt-template - Grunt version
License
MIT © Mathias Døhl