Interactive interface for browsing global, full-resolution satellite imagery
Allow passing subdirectory argument to npm build scripts
Jo Spraguead04f51f28f1
diff --git a/doc/developing.md b/doc/developing.mdindex 8a1b34d5f..1726cdc37 100644--- a/doc/developing.md+++ b/doc/developing.md@@ -6,7 +6,7 @@ This project uses `npm` as an interface to run build scripts and other tasks. Th`npm install`: Installs JavaScript and Python dependencies.-`npm run build`: Runs all build scripts and generates built versions of the app. You can also build specific assets with `npm run build:css`, `npm run build:js`, `npm run build:tests` and `npm run build:config` (compiles configuration files).+`npm run build`: Runs all build scripts and generates built versions of the app. You can also build specific assets with `npm run build:css`, `npm run build:js`, `npm run build:tests` and `npm run build:config` (compiles configuration files). If you're using a custom options repo, you can pass in a subdirectory name to the build command with `npm run build -- subdirectory_name` or the build config command with `npm run build:config -- subdirectory_name`.`npm start`: Starts the app for local development. More specifically, starts a web server that serves the contents of the `/web` directory.@@ -20,7 +20,7 @@ This project uses `npm` as an interface to run build scripts and other tasks. Th`npm run browserstack`: Runs end-to-end tests on Browserstack.-`npm run getcapabilites`: Makes a request to [the GIBS `GetCapabilities` API](https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers) and updates layer configurations.+`npm run getcapabilites`: Makes a request to [the GIBS `GetCapabilities` API](https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers) and updates layer configurations. If you're using a custom options repo, you can pass in a subdirectory with `npm run getcapabilites -- subdirectory_name`.`npm run updateconfig`: A shortcut to update the config when new layers are added. Runs `npm run getcapabilities` and `npm run build:config` behind the scenes.diff --git a/package.json b/package.jsonindex 1e6b5c82f..94d85f24a 100644--- a/package.json+++ b/package.json@@ -14,15 +14,17 @@},"scripts": {"browserstack": "node e2e/browserstack.js -c e2e/browserstack.conf.js -e browserstack --skiptags wip",- "build": "npm run getcapabilities && run-p build:* && grunt build site",+ "build": "run-s \"getcapabilities -- {1}\" \"build:config -- {1}\" && run-p build:css build:js build:tests --",+ "postbuild": "grunt build site","build:css": "node ./tasks/buildCSS",- "build:config": "bash -c 'bin/wv-options-build' && grunt config | grep --invert-match created.",+ "build:config": "bash -c 'bin/wv-options-build ${1}' 0",+ "postbuild:config": "grunt config","build:js": "node ./tasks/buildJS","build:tests": "node ./tasks/buildJS --tests","e2e": "run-s --continue-on-error --silent e2e:*","e2e:chrome": "nightwatch -e chrome","e2e:firefox": "nightwatch -e firefox --skiptags wip",- "getcapabilities": "bash -c 'FETCH_GC=1 bin/wv-options-build'",+ "getcapabilities": "bash -c 'FETCH_GC=1 bin/wv-options-build ${1}' 0","lint": "run-s lint:*","lint:css": "stylelint ./web/css/**/*.css","lint:js": "eslint .",diff --git a/tasks/buildJS.js b/tasks/buildJS.jsindex fc36f4d31..9eeb04eda 100644--- a/tasks/buildJS.js+++ b/tasks/buildJS.js@@ -34,7 +34,7 @@ function bundle() {this.emit('end');}).pipe(stream);stream.on('finish', function() {- console.log('Build complete in ' + (Date.now() - begin) / 1000 + 's');+ console.log(outputPath + ' written in ' + (Date.now() - begin) / 1000 + 's');});}