further improvements to gulp file, to work out of the box

This commit is contained in:
Peter Snyder 2017-11-11 14:21:55 -05:00
parent 5d742ad810
commit 99c613f089
No known key found for this signature in database
GPG key ID: 9690F0C12F24762F

View file

@ -76,6 +76,11 @@ gulp.task("default", function () {
fs.writeFileSync(path.join("add-on", "lib", "standards.js"), renderedStandardsModule); fs.writeFileSync(path.join("add-on", "lib", "standards.js"), renderedStandardsModule);
const thirdPartyConfigDirPath = path.join("add-on", "config", "js", "third_party");
if (!fs.existsSync(thirdPartyConfigDirPath)) {
fs.mkdirSync(thirdPartyConfigDirPath);
}
const sjclSourcePath = path.join("node_modules", "sjcl", "sjcl.js"); const sjclSourcePath = path.join("node_modules", "sjcl", "sjcl.js");
const sjclDestPath = path.join("add-on", "lib", "third_party", "sjcl.js"); const sjclDestPath = path.join("add-on", "lib", "third_party", "sjcl.js");
fs.copyFileSync(sjclSourcePath, sjclDestPath); fs.copyFileSync(sjclSourcePath, sjclDestPath);
@ -86,14 +91,13 @@ gulp.task("default", function () {
const uriSourcePath = path.join("node_modules", "uri-js", "dist", "es5", "uri.all.min.js"); const uriSourcePath = path.join("node_modules", "uri-js", "dist", "es5", "uri.all.min.js");
const uriDestPath = path.join("add-on", "lib", "third_party", "uri.all.min.js"); const uriDestPath = path.join("add-on", "lib", "third_party", "uri.all.min.js");
fs.copyFileSync(uriSourcePath, uriDestPath); fs.copyFileSync(uriSourcePath, uriDestPath);
// Now compile the vue templates into render functions, so that we // Now compile the vue templates into render functions, so that we
// can run in the CSP safe, VUE runtime. // can run in the CSP safe, VUE runtime.
const vueTemplatesSourcePath = path.join("sources", "vue"); const vueTemplatesSourcePath = path.join("sources", "vue");
const vueTemplatesDestPath = path.join("add-on", "config", "js", "vue_compiled_templates"); const vueTemplatesDestPath = path.join("add-on", "config", "js", "vue_compiled_templates");
if (!fs.existsSync(vueTemplatesDestPath)) { if (!fs.existsSync(vueTemplatesDestPath)) {
fs.mkdirSync(vueTemplatesDestPath); fs.mkdirSync(vueTemplatesDestPath);
} }