Added support for passing template options from webpack.
This commit is contained in:
parent
6b63297adc
commit
71a5107eee
4
index.js
4
index.js
@ -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;
|
||||||
};
|
};
|
||||||
|
@ -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": {
|
||||||
|
Loading…
Reference in New Issue
Block a user