This application was deprecated on March 14th 2024, there will be no further dependency or security updates.
Front-end for the Hydrogen Innovation Initiative
At BUILD time, hii-client
is configured using environment variables in a .env
file at the root of the /src
folder:
TODO update these with what we need, leaving this as an example so it's easier to update, same config.js and env.js
variable | required | default | description |
---|---|---|---|
MAPBOX_TOKEN | Y | - | Required to render the map. Token for your Mapbox account |
MAPBOX_STYLE | N | mapbox://styles/digicat-mapbox/clcja9aj6001d14o3yn7wvowa |
Map style |
At RUNTIME, edit config.js
. Default values:
{
mapboxToken: 'YOUR_TOKEN',
mapboxStyle: 'mapbox://styles/digicat-mapbox/clcja9aj6001d14o3yn7wvowa',
}
# install packages
npm i
# start service in dev mode
npm run dev
View the UI at localhost:3000
.
Utilise webpack to bundle everything for production use by running:
npm build
This will create a build/
folder where bundled .js
files will live which can be served by a web service.
This repository uses Cypress for testing UI. Specs are found in cypress/integration.
To run tests, start the service:
npm run dev
In a separate console window run either:
npm run test:integration
# OR
npm run test:dev # runs component test runner
- fonts are stored in
src/assets/fonts
and imported globally insrc/index.js
. - images are stored in
src/assets/images
and loaders configured inwebpack.config
.