You need Node.js 6.9.x installed (use nvm).
Once node is running, you will need Gulp and Bower installed globally to run the project
$ npm install -g gulp bower
Install dependencies:
$ git clone git@github.com:totem/dashboard-v2.git
$ cd dashboard-v2
$ npm install
$ bower install
$ gulp build
This will generate the dist
folder that is served in production.
Running requires having the environment variable TOTEM_DASHBOARD_CONFIG set.
$ gulp
Run the app locally in development mode at http://localhost:3000
.
$ gulp serve:dist
Run the app in "production" mode locally at http://localhost:3000
.
$ docker build -t totem-dashboard:local .
$ docker run -Pit totem-dashboard:local
Run the app in Docker which mirrors production better than the previous command. This requires that Boot2Docker is installed and running.
$ gulp test
Run unit tests
$ gulp test:auto
When running site in development mode, watch JS files and run unit tests on file change.
$ gulp protractor:src
Run e2e tests against source files
$ gulp protractor:dist
Run tests against generated dist
files (production mode)
This app is deployed automatically via Totem. (Note: This will be bundled with Totem provisioner in future.)