Squashed commit of the following: commit 4936f815552be48f52bf4ea3a570487d7dabee5a Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Wed Jun 23 16:21:41 2021 +0200 TV-224 Removed misplaced comma from angular.json commit c723d368d5d3f0b3909798e16ab553bdfcc47441 Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Wed Jun 23 15:11:10 2021 +0200 TV-224 Edit button adjusted commit 306dbe6dbd1ae0254e2ddae35b849c3b94914c7b Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Wed Jun 23 14:41:38 2021 +0200 TV-224 Button properties digified commit d031a3ca0fed14d00ea68437132f3cc64b3e4b74 Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Wed Jun 23 14:30:02 2021 +0200 TV-224 korrigerade redigera-knappen commit 21409f2a6d0ce58f5deb98c5f1c25e5da91f7219 Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Wed Jun 23 13:49:19 2021 +0200 TV-224 Colors fixed commit 9f19ac770fb99431c2e407a37ae3899446279b3b Merge: 2ed7842f7081d8Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Mon Jun 21 14:15:27 2021 +0200 TV-224 Merged develop and resolved conflicts commit 2ed7842e1a463bef9396f3131f2721522214618b Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Mon Jun 21 09:24:32 2021 +0200 TV-224 Adapted emptylisttemplate and deleted some scss classes commit d7d505fc920b4509b3d10eb5effbd5889bed35ad Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Fri Jun 18 20:24:20 2021 +0200 TV-224 More variables, refactored buttons commit 10142c6bfb951c942d530f86f4a1dc4648981339 Merge: 1e00f91 2a6ad74 Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Wed Jun 16 15:09:28 2021 +0200 TV-224 merge conflicts resolved commit 2a6ad74fb252cfe4a4d48a08574a2d26840e13bf Merge: 275065713f6ce3Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Wed Jun 16 13:18:23 2021 +0200 Merged develop and resolved conflicts commit 1e00f91a5c0021a7c54bcd771cd737db19e86aaa Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Tue Jun 15 14:00:27 2021 +0200 TV-224 Fixed comments made small adjustments commit 275065782cf94e339bddc5af9c18bd834cbc62e9 Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Mon Jun 14 09:53:49 2021 +0200 TV-224 commit fef2a920c8d9d70121b08941a14f09938c03d2e0 Merge: 1d44b1548801a9Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Wed Jun 9 15:52:04 2021 +0200 TV-224 Merge conflicts resolved commit 1d44b15d7052898ab000a427381e6e2503f6c498 Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Wed Jun 9 14:53:15 2021 +0200 TV-224 Minor adjustments commit 733102d686548e25c4b0cc82b78cb8b43beffbc4 Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Tue Jun 8 18:37:41 2021 +0200 TV-224 BEM adaption finished commit 293be94d9060a6c275fd80a657d5d8b8a3d8cf81 Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Tue Jun 8 17:49:03 2021 +0200 TV-224 More adaptions to BEM commit 318a2bb117196a4aa9bc29fbb18ca86ef1965eac Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Tue Jun 8 15:20:54 2021 +0200 TV-224 Small correction commit 42d32012a1fd1e0ad3d0f19df54408f3f8a18b68 Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Tue Jun 8 15:03:25 2021 +0200 TV-224 Prettier commit 116e47b19907493cf6849b5b33cdda8044250259 Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Tue Jun 8 14:14:37 2021 +0200 TV-224 Buttons as mixins adjust scss commit 8daaa08b1ed812bba548c77a907d8c14bfc5dfec Author: bjornahlen <bjorn.ahlen@arbetsformedlingen.se> Date: Mon Jun 7 15:16:53 2021 +0200 TV-224-Adjust content Small fix ... and 6 more commits
DAFA-web
The project was generated using Nx.
Quick Start & Documentation
For all commands we will refer to the npm scripts located inside package.json. When using these commands, you do not need to have @angular/cli installed globally on your computer.
To get started, clone the repository and run npm install in the root of the project, this will install all dependencies.
Development server DAFA-web
Run npm start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Dotnet API
Run npm run start:api to run against the Dotnet API.
Generate an application
Run npm run new-app my-app to generate an application. When using Nx, you can create multiple applications and libraries in the same workspace.
Generate a library
Run npm run new-lib my-lib to generate a library. Libraries are shareable across libraries and applications. They can be imported from @dafa-web-monorepo/mylib.
Code scaffolding
Run npm run new-component my-component --project=my-app to generate a new component.
Build DAFA-web
Run npm run build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
Dotnet API
Run npm run build:api to build the project using the Dotnet API.
Running unit tests on DAFA-web
Run npm run test to execute the unit tests via Jest.
Run npm run nx affected:test to execute the unit tests affected by a change.
Running end-to-end tests on DAFA-web
Run npm run e2e to execute the end-to-end tests via Cypress.
Run npm run nx affected:e2e to execute the end-to-end tests affected by a change.
Understand your workspace
Run npm run nx dep-graph to see a diagram of the dependencies of your projects.
Git workflow
-
Use branching model Gitflow.
- Example:
feature/TV-XXXXorbugfix/TV-XXXX - A useful CLI helper tool can be used: gitflow-avh.
- Example:
-
Clone origin, create feature/bugfix branches and push back to origin.
-
Don't forget to commit and push your changes regulary!
-
Create a pull request for each feature branch.
-
When merging the pull request, follow conventional commits structure inside the merge message.
-
The merge-message, which follows conventional commits, will be added to the CHANGELOG after a release is made.
-
A commit message could look like this:
feat(startpage): Added headings and description to the startpage (TV-1234). -
The changelog would look something like this:
### Features - **startpage:** Added headings and description to the startpage ([TV-1234](https://jira.arbetsformedlingen.se/browse/TV-1234)) ([commit-hash](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/dafa-web-monorepo/commits/commit-hash))
-
-
Upon merge, Open Shift will deploy the application to AUTO and TEST.
Release and deploy
We use a semi-automated release and deploy to different test-enviroments. A release script is used in combination with semantic-release to add the correct version of the application and changes to the changelog. The deployments are made depending on which branches are updated:
developis automatically deployed to AUTO and TEST.nextis automatically deployed to SYS.mainis automatically deployed to ACC. After this is completed, a question needs to be answered whether the image should be deployed to PROD.
Deploy to SYS
To deploy the application to SYS you need to create a release. Make sure you are in the develop branch and are up-to-date with origin. Then run npm run release. This will:
- Update the CHANGELOG.md and copies the CHANGELOG to assets.
- Bump the applications version according to semantic versioning.
- Commits the CHANGELOG to
developand pushes it to origin. - Merge
developintonextand pushesnextto origin.
Open Shift will deploy the application to SYS.
Release to ACC and PROD
To release the latest version of next to ACC and eventually to PROD; a pull request should be created to merge next into main. The next branch is protected and will not be deleted upon merge.
Open Shift will deploy the application to ACC and a question inside the pipeline is asked if the application also should be deployed to PROD. This question will persist for 24 hours.