Updated README with info about settings.

This commit is contained in:
Dmitriy Kubyshkin 2014-12-15 17:55:16 +01:00
parent 71a5107eee
commit df4694b171
2 changed files with 13 additions and 1 deletions

View File

@ -18,6 +18,18 @@ var template = require("tpl!./file.html");
template(data) // Pass object with data
```
You can add `_.template` settings as a `tplSettings` property inside webpack config file to specify options for the loader, for example:
``` javascript
...
tplSettings: {
escape: /\{\{([^{].*?)\}\}/gm,
interpolate: /\{\{\{(.+?)\}\}\}/gm,
evaluate: /\{\%(.+?)\%\}/g
}
...
```
## License
MIT (http://www.opensource.org/licenses/mit-license.php)

View File

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