mirror of
https://github.com/valitydev/dashboard.git
synced 2024-11-06 10:35:21 +00:00
.vsc-templates | ||
.vscode | ||
build_utils@4a09386542 | ||
e2e | ||
schemes | ||
src | ||
swagger-codegen | ||
tools | ||
.gitignore | ||
.gitmodules | ||
.prettierignore | ||
.prettierrc | ||
angular.json | ||
containerpilot.json | ||
Dockerfile.sh | ||
Jenkinsfile | ||
Makefile | ||
nginx.conf | ||
package-lock.json | ||
package.json | ||
README.md | ||
swagger-codegen-config.json | ||
tsconfig.json | ||
tslint.json | ||
webpack.extra.js |
Dashboard
Libraries
- Angular CLI
- Run
ng generate component component-name
to generate a new component (you can also useng generate directive|pipe|service|class|guard|interface|enum|module
). - To get more help use
ng help
or go check out the Angular CLI README.
- Run
- Angular Material
- Prettier
Initialization
Install packages
npm ci
Generate Angular modules from swags
npm run codegen
Development server
-
API (Production API default)
-
With mocks:
Change
./src/appConfig.json
API endpoints
-
-
Start
-
Real Keycloak:
npm start
-
Stub Keycloak
-
Change
./src/authConfig.json
/"auth-server-url"
: -
npm run stub
-
-
-
Navigate to
http://localhost:8000/
Production build
- Run
npm run build
- The build artifacts will be stored in the
dist/
directory.
Add API
-
Add submodule
git submodule -b <SCHEME_BRANCH> add <SCHEME_REPO> schemes/<SCHEME_NAME>/<VER:VX>
-
Add
schemes/<SCHEME_NAME>/<VER:VX>
toMakefile
SWAGGER_SCHEMES_PATH
property -
Add
"<SCHEME_NAME>": "schemes/<SCHEME_NAME>/<VER:VX>"
toswagger-codegen-config.json
schemes
/schemes3
property -
Add
"<SCHEME_NAME>Endpoint": "<URL>"
tosrc/assets/appConfig.json
api
property -
Add in
src/api/<SCHEME_NAME>
files:index.ts
<SCHEME_NAME>.module.ts
<SCHEME_NAME>-config.service.ts
-
Add
<SCHEME_NAME>.module.ts
tosrc/app/api/api.module.ts
imports
Tests
- Run
npm run test
to execute the unit tests via Karma. - Run
npm run e2e
to execute the end-to-end tests via Protractor.
Utils
Analyze bundle size
npm run build -- --prod --stats-json --extraWebpackConfig webpack.extra.js
npx webpack-bundle-analyzer dist/stats.json