Skip to content
Snippets Groups Projects
user avatar
mbucknell authored
Created a monitoring-location directory. Javascript that is unique to storing data and rendering that page was moved to this directory. This follows the same pattern as the networks directory.
cf85d187
History

WDFN Compiled Static Assets

This project includes compiled assets for Water Data For The Nation. The assets produced by this project are dependencies of both wdfn-server (Flask) and graph-server (node.js).

Install dependencies

Javascript and SASS assets are built with Node.js v10.15.3. Usage of nvm is a convenient way to use a specific version of Node.js:

nvm use v10.15.3

Node.js dependencies are installed via:

npm install

Run a development server

Run the node.js development server at http://localhost:9000:

npm run watch

Test the production static assets build locally

To build the complete production package, built to ./dist:

npm run build

Rather than using the watch task, you can serve the manually built assets. To locally serve the production build without recompiling on filesystem changes:

npm run serve:static

Running tests

To run tests in Chrome via Karma, these are equivalent:

npm test
npm run test

To watch Javascript files for changes and re-run tests with Karma on change, run:

npm run test:watch