Added support for passing template options from webpack.

This commit is contained in:
Dmitriy Kubyshkin 2014-12-15 16:47:57 +01:00
parent 6b63297adc
commit 71a5107eee
2 changed files with 3 additions and 3 deletions

View File

@ -2,6 +2,6 @@ var _ = require('lodash');
module.exports = function (source) { module.exports = function (source) {
this.cacheable && this.cacheable(); this.cacheable && this.cacheable();
var template = _.template(source); var template = _.template(source, null, this.options.tplSettings);
return 'module.exports = ' + template; return 'var _ = require(\'lodash\');\nmodule.exports = ' + template;
}; };

View File

@ -1,6 +1,6 @@
{ {
"name": "tpl-loader", "name": "tpl-loader",
"version": "0.1.1", "version": "0.2.0",
"description": "Underscore Templates loader for webpack", "description": "Underscore Templates loader for webpack",
"main": "index.js", "main": "index.js",
"repository": { "repository": {