File tree 3 files changed +36
-0
lines changed
3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ # tplite-loader
3
+
4
+ webpack loader for tplite template.
5
+
6
+ > using tplite.Template, compile to function when build project.
7
+
8
+
Original file line number Diff line number Diff line change
1
+ var { Template } = require ( 'tplite' ) ;
2
+
3
+ var template = new Template ( ) ;
4
+
5
+ module . exports = function ( content ) {
6
+ var compile = template ( content ) ;
7
+ return "module.exports = " + compile . toString ( ) . replace ( 'anonymous' , '' ) + ";\n" ;
8
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " tplite-loader" ,
3
+ "version" : " 1.0.0" ,
4
+ "description" : " webpack loader for tplite template." ,
5
+ "main" : " loader.js" ,
6
+ "author" : {
7
+ "name" : " lloydzhou" ,
8
+
9
+ },
10
+ "keywords" : [
11
+ " Webpack" ,
12
+ " Loader" ,
13
+ " tplite"
14
+ ],
15
+ "repository" : {
16
+ "type" : " git" ,
17
+ "url" : " https://github.com/tplite/loader"
18
+ },
19
+ "readmeFilename" : " README"
20
+ }
You can’t perform that action at this time.
0 commit comments