add browser build - closes #17
This commit is contained in:
@@ -201,11 +201,11 @@ exports.repeat = function (width, cha) {
|
||||
return new Array(width + 1).join(cha);
|
||||
};
|
||||
|
||||
var templatesCacheLoc = __dirname + "/../../templates.json";
|
||||
try {
|
||||
exports.templates = require("../../templates.json");
|
||||
} catch (err) {
|
||||
if (err.code !== "MODULE_NOT_FOUND") throw err;
|
||||
|
||||
if (fs.existsSync(templatesCacheLoc)) {
|
||||
exports.templates = require(templatesCacheLoc);
|
||||
} else {
|
||||
exports.templates = {};
|
||||
|
||||
var templatesLoc = __dirname + "/templates";
|
||||
|
||||
Reference in New Issue
Block a user