Development
July 13, 2024 ยท View on GitHub
This document describes how you can lint, test, build and publish this project.
Prerequisite
Before you can start you must install and configure the following products on your development machine:
You will then need to clone this project and install the required dependencies:
git clone <repository_url> <dir_name>
cd <dir_name>
npm install
Linting/verifying source code
Check that the code is properly formatted and adheres to coding style.
npm run lint -w projects/lib
Unit testing
Ensure that each unit of the library performs as expected.
npm run test -w projects/lib
Testing locally
You can test the library while developing it, as follow:
npm run start -w projects/lib
And then:
npm run start -w projects/tests
Building the library
The library will be built in the ./dist directory.
npm run build -w projects/lib
Publishing to NPM repository
This project comes with automatic continuous delivery (CD) using GitHub Actions.
- Bump the library version in
./projects/lib/package.json - Push the changes
- Create a new GitHub release
- Watch the results in: Actions
Developing the documentation
npm run start --prefix=projects/docs
Publishing the documentation to GitHub Pages
This project comes with automatic continuous delivery (CD) using GitHub Actions.
- Make any changes under
./projects/docs/ - Push the changes
- Watch the results in: Actions