Skip to content

Commit e5a06e4

Browse files
committed
Use the file basename as id for pure template files.
1 parent 5826b7e commit e5a06e4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"use strict";
1818
var tmpl = require("./tmpl.js").tmpl,
1919
fs = require("fs"),
20+
path = require("path"),
2021
jsp = require("uglify-js").parser,
2122
pro = require("uglify-js").uglify,
2223
// Retrieve the content of the minimal runtime:
@@ -63,6 +64,7 @@
6364
}
6465
if (listLength === list.length) {
6566
// No template script tags found, use the complete content:
67+
id = path.basename(file, path.extname(file));
6668
list.push("'" + id + "':" + tmpl.print(content));
6769
}
6870
}

0 commit comments

Comments
 (0)