This readme contains information about setting up and developing Sat4Env frontend.
- nodejs
14.18.1
- npm
^6
To install all dependencies run:
npm install
This application requires backend to be working, refer to the general documentation about running it and all related services here
Application is written in angular so all standard ng
commands will work, but for convenience
npm scripts has been defined:
npm start
starts development server with proxy to backend and HMR enabled.npm run extract-i18n
extracts translation string from the application
So to start application for development run:
npm start
NOTICE: Local web server will be available on https://localhost:4200/, and it will start with /api
route proxied to http://localhost:4201
, where backend should be present.
Application is written in Angular 7+, with support for ReduxDevTools via Akita Store
Unit tests use JEST framework integrated with angular via @angular-builders/jest. For E2E cypress.io is used.
Run ng build
to build the project. The build artifacts will be stored in the target/
directory. Use the --prod
flag for a production build.
Running ng build --prod
may fail due to a bug in either angular-cli or openlayers: openlayers/openlayers#8357.
Makeshift fix is to remove sideEffects
property from node_modules/ol/package.json
as described in the github issue.
When building with mvn
, you can customize the run-script
build execution's argument.
By default, it runs the script build
, but you can override it with an environment variable NPM_BUILD_RUN_SCRIPT_ARG
,
e.g., NPM_BUILD_RUN_SCRIPT_ARG=build-private ../mvnw package
.