Skip to content
Snippets Groups Projects
Commit cc98cf21 authored by Shane Tomlinson's avatar Shane Tomlinson Committed by Austin King
Browse files

Update the build script to no longer overwrite shared/templates.js

* create_templates looks for the BUILD_DIR env variable and places templates there.
* compress sets the BUILD_DIR env variable for create_templates.

close #1021
parent 1396e429
No related branches found
No related tags found
No related merge requests found
......@@ -53,8 +53,7 @@ echo ''
## resources/templates.js and included into the minified bundle.
cd dialog/views
../../../../scripts/create_templates.js
cp templates.js $BUILD_PATH/templates.js
`BUILD_DIR=$BUILD_PATH ../../../../scripts/create_templates.js`
cd ../..
# produce the dialog js
......
......@@ -7,7 +7,7 @@
const fs = require("fs");
var dir = process.env.TEMPLATE_DIR || process.cwd();
console.log(dir);
var output_dir = process.env.BUILD_DIR || dir;
var templates = {};
......@@ -23,6 +23,6 @@ fs.readdir(dir, function(err, fileNames) {
var templateData = "BrowserID.Templates =" + JSON.stringify(templates) + ";";
fs.writeFileSync(dir + "/templates.js", templateData, "utf8");
fs.writeFileSync(output_dir + "/templates.js", templateData, "utf8");
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment