This project includes compiled assets for the Water Quality Portal. The assets produced by this project are dependencies of the Flask server.
Javascript and LESS assets are built with Node.js v8.11.2. Usage of nvm is a convenient way to use a specific version of Node.js:
nvm use v8.11.2
Node.js dependencies are installed via:
npm install
Run the node.js development server at http://localhost:9000:
npm run watch
If you need to run the development server at https https://127.0.0.1:9000:
npm run httpswatch
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
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