Urban Risk Map reporting cards web-app.
Run npm run start (for default deployment jp) or dep=cc npm run pre-build-tasks && ng serve (for deployment with code cc) for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
- Run
export dep='xx'&npm run add-deploymentto create the scaffolding for a new deployment. - The following files will be added in the specified folders:
src/environments/xx- environment.json
- environment.prod.json
deployments/xx/- index.html
/assets/icons/images/locales- en.json
/logos
/resources
angular.jsonwill be modified to add deployment configurations.package.jsonwill be modified to add build scripts.- The default deck that will be served is
flood. - To test the deployment locally, change the deployment variable in
package.json>scripts.start, runnpm start, and openhttp://localhost:4200/test123/floodin the browser.
- Run
export deck=sample&npm run add-deckto create a route to a new cards deck. - This will add a new folder,
sampleinsrc/app/routes/decks, including the following:
- sample-routing.module.ts
- sample.component.html
- sample.component.scss
- sample.component.spec.ts
- sample.component.ts
- sample.module.ts
- Add a new object to the list of "decks" in
src/environments/$dep/environment.jsonfor the respective deployments, with the following structure:
{
"decks": [
"name": "sample",
"cards": [
"location"
]
]
}- To test the deck locally, change the deployment variable in
package.json>scripts.startto $dep for which the environment file was modified in Step 3, runnpm start, and openhttp://localhost:4200/test123/sample.
- Run
export card=card_name&npm run add-cardto create a route to a new card. - Add
card_nameto the list of 'cards' insrc/environments/$dep/environment.jsonfor the desired deck object, eg.
{
"decks": [
"name": "flood",
"cards": [
"card_name"
]
]
}- To test the card locally, change the deployment variable in
package.json>scripts.startto $dep for which the environment file was modified in Step 2, runnpm start, and openhttp://localhost:4200/test123/flood/card_name.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.