Skip to content

Commit 1aa710b

Browse files
committed
Cache dash template in buildDashDocSet.
1 parent 23843ac commit 1aa710b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/utils.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ module.exports.buildDashDocSet = function (input) {
1313

1414
var zip = new admzip(),
1515
tempdb = temp.openSync('temp.sqlite'),
16-
db = new sqlite3.Database(tempdb.path);
16+
db = new sqlite3.Database(tempdb.path),
17+
template = require('../templates/dash/method.hbs');
1718

1819
input.uid = module.exports.formatStringForUID(input.title);
1920

@@ -23,7 +24,7 @@ module.exports.buildDashDocSet = function (input) {
2324

2425
zip.addFile(
2526
input.title + '.docset/Contents/Resources/Documents/' + method.uid + '.html',
26-
require('../templates/dash/method.hbs')(method)
27+
template(method)
2728
);
2829

2930
});

0 commit comments

Comments
 (0)