Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

update developing documentation for webpack related npm script changes

Ed Plato8a63472a292a
diff --git a/doc/developing.md b/doc/developing.md
index 73fa625bd..b11f4d6a9 100644
--- a/doc/developing.md
+++ b/doc/developing.md
@@ -1,49 +1,37 @@
+
# Developing
## Building
-This project uses `npm` to run build scripts and other tasks. The scripts are a
-combination of JavaScript, Bash and Python scripts.
+This project uses `npm` to run build scripts and other tasks. The scripts are a combination of JavaScript, Bash, and Python scripts. Webpack is used as a module bundler.
+
+**`npm run build`**: Main build script cleans previous build directory, gets available imagery via a GIBS GetCapabilities request, adds build configuration (options), and builds the Webpack bundle in Development mode. Generates a build in `build/` and `dist/site-worldview.tar.bz2`. If you have a custom configuration subdirectory, pass it to the command with `npm run build -- subdirectory_name`.
-**`npm run build`**: Runs all the `build:x` scripts below and generates a build
-in `build/` and `dist/site-worldview.tar.bz2`. If you have a custom configuration
-subdirectory, pass it to the command with `npm run build -- subdirectory_name`.
To build the app with an incomplete configuration, prefix the command like this:
`IGNORE_ERRORS=true npm run build`.
-**`npm run build:js`**: Builds the JavaScript bundle for the app and writes it
-to `web/build/wv.js`.
+**`npm run build:dev`**: Builds the JavaScript and CSS bundles for the app in Development mode and writes them to `web/build/wv.js` and `web/build/wv.css`, respectively.
-**`npm run build:css`**: Builds the CSS bundle for the app and writes it to
-`web/build/wv.css`.
+**`npm run build:prod`**: Builds the JavaScript and CSS bundles for the app in Production mode. This mode includes build optimizations and results in a smaller bundle size.
-**`npm run build:config`**: Builds the configuration (options) for the app in
-`build/options/` and `dist/worldview-config.tar.bz2`.
+**`npm run build:config`**: Builds the configuration (options) for the app in `build/options/` and `dist/worldview-config.tar.bz2`.
-**`npm run build:tests`**: Builds a JavaScript bundle in `web/build/wv-test-bundle.js`
-for running tests.
+**`npm run build:tests`**: Builds a JavaScript bundle in `web/build/wv-test-bundle.js` for running tests.
**`npm run clean`**: Remove all files generated by the build.
-**`npm run distclean`**: Remove all temporary files returning the repository
-to a pristine state.
+**`npm run distclean`**: Remove all temporary files returning the repository to a pristine state.
+
+**`npm run dist`**: Create a distribution tarball of the application that can be unpacked on a web server.
+
+**`npm run dist:dev`**: Create a development version of the distribution tarball.
-**`npm run dist`**: Create a distribution tarball of the application that
-can be unpacked on a web server.
+## Development Tools
-**`npm run dist:dev`**: Create a development version of the distribution
-tarball.
+**`npm run analyze`**: Runs Webpack Bundle Analyzer to visualize size of output files with an interactive zoomable treemap. Default analyze interface is served at http://127.0.0.1:8888/.
-**`npm watch`**: Runs all the build scripts necessary for local development in watch
-mode. JS and CSS bundles are updated automatically when source files change.
-This does not create any assets in `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 run watch`**: Builds and serves local Development mode Webpack bundle in watch mode using Webpack Dev Server. JS and CSS bundles are updated automatically when source files change. 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.
## Starting
-**`npm start`**: Starts the app for local development. Express serves the
-contents of the `web/` directory. For advanced usage, edit `tasks/start.js` to
-serve the `build/site-worldview/` directory instead, which includes string
-placeholder replacements.
+**`npm start`**: Starts the app for local development. Express serves the contents of the `web/` directory. For advanced usage, edit `tasks/start.js` to serve the `build/site-worldview/` directory instead, which includes string placeholder replacements.
\ No newline at end of file