Skip to content

Commit f99b3c4

Browse files
committed
update README.md
1 parent 8a4d507 commit f99b3c4

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ template string optimize loader module for webpack
88
## Usage
99

1010
``` javascript
11-
module: {
12-
loaders: [
13-
{
14-
test: /\.js$/,
15-
loader: 'template-string-optimize!babel'
16-
}
17-
]
18-
}
11+
module: {
12+
loaders: [
13+
{
14+
test: /\.js$/,
15+
loader: 'template-string-optimize!babel'
16+
}
17+
]
18+
}
1919
```
2020

2121
## Example
@@ -44,7 +44,9 @@ const template = data => `
4444
`;
4545

4646
// ES5
47+
<div>
4748
function(n,t){"use strict";var e=function(n){return"\n <!-- section start -->\n <section>\n <h3>"+n.title+"</h3>\n <div>"+n.date+"</div>\n <dl>\n <dt>Coffee</dt>\n <dt>Black hot drink</dt>\n <dt>Milk</dt>\n <dd>\n <ul>\n "+n.list.map(function(n){return"\n <li>"+n+"</li>\n "}).join("")+"\n </ul>\n </dd>\n </dl>\n </section>\n <!-- section end -->\n"};
49+
</div>
4850

4951
// optimized
5052
function(t,e){"use strict";var i=function(t){return"<section><h3>"+t.title+"</h3><div>"+t.date+"</div><dl><dt>Coffee</dt><dt>Black hot drink</dt><dt>Milk</dt><dd><ul>"+t.list.map(function(t){return"<li>"+t+"</li>"}).join("")+"</ul></dd></dl></section>"};

0 commit comments

Comments
 (0)