grunt-ejs
A Grunt task for compiling ejs templates.
Getting Started
Install this grunt plugin next to your project's
Gruntfile.js with: npm install grunt-ejs --save-dev
.
Then add this line to your project's Gruntfile.js
:
grunt;
Documentation
Add the task to your config and specify the destination for the compiled file:
grunt;
Passing data/helpers to the templates
Use options
to pass data and helpers to the templates:
Gruntfile.js:
grunt;
app/index.ejs:
<%= title %> Home Page
Ideally all your helpers and non-app specific config should be another module and merged in like this:
grunt;
Release History
- 1.0.0
- update ejs to 3.0.2
- 0.3.0
- update ejs to 2.2.3
- fix file options
- 0.2.0 update ejs to 1.0.0
- 0.1.0 initial release
License
Copyright (c) 2014 Kyle Robinson Young
Licensed under the MIT license.