Updated README with info about settings.
This commit is contained in:
parent
71a5107eee
commit
df4694b171
12
README.md
12
README.md
@ -18,6 +18,18 @@ var template = require("tpl!./file.html");
|
|||||||
template(data) // Pass object with data
|
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
|
## License
|
||||||
|
|
||||||
MIT (http://www.opensource.org/licenses/mit-license.php)
|
MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tpl-loader",
|
"name": "tpl-loader",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"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