React.js components for Sage UIs.
Requires node.js (v16+ recommended).
Clone this repo, cd
to that directory, and run:
npm install
Start a dev server:
npm start
You can start a dev server for a different app with
npm start -w <app>
. For example,npm start -w project
npm run build -w sage
or,
npm run build -w <app>
The config for a project page is controlled with the env variable SAGE_UI_PROJECT
. I.e.,
export SAGE_UI_PROJECT=DAWN
npm start -w admin
To use Mapbox, you can use a local env variable MAPBOX_TOKEN
:
export MAPBOX_TOKEN=<token_string>
npm start -w admin
Run tests using
npm test
Read more about tests here.
NOTE: there is currently a bug in this docker flow!
Build/run:
export MAPBOX_TOKEN=<token_string>
docker build --build-arg MAPBOX_TOKEN -t sage-ui .
docker run -dp 8080:80 sage-ui