Interactive interface for browsing global, full-resolution satellite imagery
use active env path if that option is specified
Jason Kent1a7d9c04c9fc
diff --git a/tasks/dist.js b/tasks/dist.jsindex a4cb6b090..cb4856964 100755--- a/tasks/dist.js+++ b/tasks/dist.js@@ -12,7 +12,11 @@ shell.mkdir('-p', 'build/worldview');shell.cp('-rf', 'web/*', 'build/worldview');// Remove preview images, if that feature is disabled, for smaller dist file size-const { features } = JSON.parse(fs.readFileSync('config/default/common/features.json'));+const { CONFIG_ENV } = process.env;+const featuresConfigPath = CONFIG_ENV+ ? `config/active/${CONFIG_ENV}/features.json`+ : 'config/default/common/features.json';+const { features } = JSON.parse(fs.readFileSync(featuresConfigPath));if (!features.previewSnapshots) {shell.rm('-rf', 'build/worldview/images/layers/previews');}diff --git a/tasks/upload.js b/tasks/upload.jsindex 38aef57ad..adfee6474 100755--- a/tasks/upload.js+++ b/tasks/upload.js@@ -135,13 +135,16 @@ async function upload() {}if (!argv.dist) {- const cmd = 'npm run build';const options = {};if (argv.env) {- options.env = { ...process.env, CONFIG_ENV: argv.env };+ options.env = {+ ...process.env,+ CONFIG_ENV: argv.env,+ };}- shell.exec(cmd, options);- shell.exec('node ./tasks/dist.js');++ shell.exec('npm run build', options);+ shell.exec('node ./tasks/dist.js', options);}upload();