1.0.0 • Published 8 years ago

ejs-render-loader v1.0.0

Weekly downloads
121
License
MIT
Repository
github
Last release
8 years ago

ejs-render-loader for webpack

EJS loader for webpack. Uses ejs function to compile templates.

Installation

npm install ejs-render-loader

Usage

Documentation: Using loaders

var template = require('ejs-render!./file.ejs');
// => returns rendered output from file.ejs

// Child Templates
// path is relative to template
<%- include childdir/child -%>

// Query Parameters: (passed to template)
//		raw (boolean) - output raw markup, for use with file-loader
//		ejs (object) - options to pass to ejs.compile
require('!!file?name=[name].html!ejs-render?raw=true!./client/html/index.ejs');

License

MIT (http://www.opensource.org/licenses/mit-license.php)