Code de l'application de coopération sur le cadastre solairede Rennes Métropole basée sur un jumeau numérique.
This app install the @sigrennesmetropole/cooperation_jn_common_ui package. Although this package is public, you still need a Private Access Token (PAT) from github to download it.
In order to do that you need to follow this instructions. And create a token with package:read permission.
Then, in your personnal ~/.npmrc you need to add this line:
//npm.pkg.github.com/:_authToken=<YOUR PAT>
And then install dependencies with:
npm i --userconfig
Or, you could also change ./npmrc project file, and replace NPM_TOKEN by your PAT.
Careful! If you change the project npmrc file, you must be careful and not commit the change. The docker image in the CI is build by replacing the ${NPM_TOKEN} by the GITHUB_TOKEN of the repository. The CI will fail. Moreover if you commit your own PAT, it will be invalidated by Github.
If you want to work by changing the project .npmrc, the easiest way is probably to ignore it in your git index before changing it:
git update-index --skip-worktree .npmrc
For local development (with local Back End), please use .env.local.dev
to create .env
The @sigrennesmetropole/cooperation_jn_common_ui package is frequently patch. Try to keep it up-to-date.
npm i
npm start
npm run story
docker build -t cooperation_jn_solar:latest --build-arg NPM_TOKEN=<YOUR_GITHUB_NPM_TOKEN>.
docker run -p 8080:80 cooperation_jn_solar:latest
Through Github pipeline, an image is created on every push on 'main' branch, and on each pull request. The repository for this image can be found here: https://github.com/sigrennesmetropole/cooperation_jn_solar/pkgs/container/cooperation_jn_solar/versions
- An image is created, it is tag with 'pr-#' where # is the id of the pull request
- An image is created, it is tag with the short hash of the last commit on main branch.
npm run build
Run Unit Tests with Vitest
npm run test:unit
Run End-to-End Tests with Cypress
npm run build
npm run test:e2e # or `npm run test:e2e:ci` for headless testing
Lint with ESLint
npm run lint:js
npm run format
npm run story