cic-staff-client/README.md

66 lines
2.4 KiB
Markdown
Raw Permalink Normal View History

2021-02-16 14:18:41 +01:00
# CICADA
An angular admin web client for managing users and transactions in the CIC network.
2020-10-30 16:16:05 +01:00
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.0.
## Angular CLI
Run `npm install -g @angular/cli` to install the angular CLI.
2020-10-30 16:16:05 +01:00
## Development server
2021-05-12 16:12:02 +02:00
Run `ng serve` for a local server, `npm run start:dev` for a dev server and `npm run start:prod` for a prod server..
Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
2020-10-30 16:16:05 +01:00
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
2021-02-16 14:18:41 +01:00
## Lazy-loading feature modules
Run `ng generate module module-name --route module-name --module app.module` to generate a new module on route `/module-name` in the app module.
2020-10-30 16:16:05 +01:00
## Build
2021-05-12 16:12:02 +02:00
Run `ng build` to build the project using local configurations.
The build artifacts will be stored in the `dist/` directory.
Use the `npm run build:dev` script for a development build and the `npm run build:prod` script for a production build.
## PWA
The app supports Progressive Web App capabilities.
2021-04-29 07:29:54 +02:00
2021-05-12 16:12:02 +02:00
Run `npm run start:pwa` to run the project in PWA mode.
PWA mode works using production configurations.
2020-10-30 16:16:05 +01:00
## Running unit tests
2021-05-12 16:12:02 +02:00
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
2020-10-30 16:16:05 +01:00
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
2021-03-15 17:26:53 +01:00
## Environment variables
2021-05-12 16:12:02 +02:00
Default environment variables are located in the `src/environments/` directory.
Custom environment variables are contained in the `.env` file. See `.env.example` for a template.
2021-03-15 17:26:53 +01:00
2021-05-12 16:12:02 +02:00
Custom environment variables are set via the `set-env.ts` file.
2021-03-18 18:31:50 +01:00
Once loaded they will be populated in the directory `src/environments/`.
2021-05-12 16:12:02 +02:00
It contains environment variables for development on `environment.dev.ts` and production on `environment.prod.ts`.
2021-03-15 17:26:53 +01:00
2021-05-12 16:38:22 +02:00
## Code formatting
2021-05-12 16:46:49 +02:00
The system has automated code formatting using [Prettier](https://prettier.io/) and [TsLint](https://palantir.github.io/tslint/).
2021-05-12 16:38:22 +02:00
To view the styling rules set, check out `.prettierrc` and `tslint.json`.
Run `npm run format:lint` To perform formatting and linting of the codebase.
2020-10-30 16:16:05 +01:00
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.