underscore-template-loader
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -41,7 +41,7 @@ var _ = require('underscore'); | ||
var callback = this.async(); | ||
content = resolveContent(content, "./"); | ||
content = resolveContent(content, this.context); | ||
var fn = _.template(content); | ||
callback(null, "module.exports = " + fn + ";"); | ||
callback(null, "module.exports = " + fn.source + ";"); | ||
}; | ||
module.exports._ = _; |
{ | ||
"name": "underscore-template-loader", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A Underscore template loader for Webpack", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -31,2 +31,3 @@ underscore-template-loader | ||
```html | ||
<!-- file: hello.html --> | ||
<p>Hello <%=name%></p> | ||
@@ -41,4 +42,19 @@ ``` | ||
<br/> | ||
**Include tag** | ||
```html | ||
<!-- file: main.html --> | ||
<p>Hello, <!--include message.html--></p> | ||
``` | ||
```html | ||
<!-- file: message.html --> | ||
<em>how are you?</em> | ||
``` | ||
<br/> | ||
###License | ||
Released under the MIT license. |
4502
58