This document describes how you can create, lint, test, build and publish packages in this project.
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
-
Create a new package using the built-in schematic tool:
npm run new-package
-
Reorder alphabetically what was generated in
README.md
and.github/workflows/ci_release.yml
. -
If this new package has any other internal packages as peer dependencies:
- Make sure that this new package is also tested during the tests of the other packages
(have a look at ci_test_core.yml for examples)
- Make sure that this new package is also tested during the tests of the other packages
Check that the code is properly formatted and adheres to coding style.
npm run lint
You can also verify it per package:
npm run lint -w projects/<package_name>
Unit testing a package can be executed with the following command:
npm run test -w projects/<package_name>
Building a package can be executed with the following command:
npm run build -w projects/<package_name>
This project comes with automatic continuous delivery (CD) using GitHub Actions.
To publish a package:
- Trigger a new workflow release
- Watch the results in: Actions
A previous tag needs to be found to compute the next semver version.
When you publish a package for the first time, you will have to do the following:
-
Commit and push the package, using this commit message:
feat(<package_name>): first commit
-
Add a tag to the commit prior to the one you just created, and push it:
@hug/ngx-<package_name>@1.0.0
-
Trigger a new release
-
Once done, remove the tag you previously created