Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Improve options to bypass errors for incomplete configuration

Jo Spragueb15b406a49d5
diff --git a/bin/wv-options-build b/bin/wv-options-build
index 0d1548cae..75a23068e 100755
--- a/bin/wv-options-build
+++ b/bin/wv-options-build
@@ -15,7 +15,8 @@ if [ -d "$BASE/options" ]; then
OPT_DIR="$BASE/options"
fi
-[ "$FORCE" ] || set -e
+# If $IGNORE_ERRORS is true, don't fail on errors
+[ "$IGNORE_ERRORS" ] || set -e
die() {
echo "$PROG: ERROR: $@" >& 2
diff --git a/doc/developing.md b/doc/developing.md
index 1726cdc37..53fb97736 100644
--- a/doc/developing.md
+++ b/doc/developing.md
@@ -6,11 +6,21 @@ 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). 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 run build`: Runs all of the `build:x` scripts below and generates all builds of the app. If you have configuration options in a subdirectory of `/options` other than `options/release`, you can pass in the name of the subdirectory you would like to use with `npm run build -- subdirectory_name`. If you would like to build the app with an incomplete configuration, you should prefix the command like this; `IGNORE_ERRORS=true npm run build`.
+
+`npm run build:js`: Builds the JavaScript bundle for the app.
+
+`npm run build:css`: Builds the CSS bundle for the app.
+
+`npm run build:config`: Builds the configuration (options) for the app. If you have configuration options in a subdirectory of `/options` other than `options/release`, you can pass in the name of the subdirectory you would like to use with `npm run build:config -- subdirectory_name`. If you would like to build the app with an incomplete configuration, you should prefix the command like this; `IGNORE_ERRORS=true npm run build:config`.
+
+`npm run build:tests`: Builds a JavaScript bundle for running tests.
+
+ 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.
-`npm watch`: Runs all of the build tasks necessary for local development in watch mode so that the build is automatically when source files change. You should run `npm run build` first to fetch GIBS configuration. This does not generate a final build, and is only for local development.
+`npm watch`: Runs all of the build tasks necessary for local development in watch mode so that the build is automatically when source files change. This does not generate a final build, and is only for local development. You must run `npm run build` or `npm run build:config` first to make a request to [the GIBS `GetCapabilities` API](https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers) and build the configuration files.
`npm test`: Runs all tests and linting to verify code quality. Make sure to run `npm run build` or `npm run build:tests` first to build a testable version of Worldview.
@@ -30,7 +40,7 @@ This project uses `npm` as an interface to run build scripts and other tasks. Th
We're in the process of replacing our Grunt tasks with npm scripts, but here are the Grunt build scripts that are available. Note, these are poorly documented and you should use caution when running these scripts if you don't know what you're doing. Your mileage may vary when running scripts marked with a `*` by themselves.
-`grunt`: The default Grunt task runs all of the scripts necessary to generate a build. Among other things, it applies branding and other configuration options, compiles assets and generates build artifacts in `/build` and `/dist`. The default Grunt task does not run tests.
+`grunt`: This task is deprecated, and we don't recommend that you use it. Instead, use `npm run build` to generate a build. Under the hood, this is a shortcut for `grunt build && grunt config && grunt site`.
`grunt config`* : Compiles branding and configuration options into an intermediate build directory and generates `tar` files of that directory.