Cloudify UI Common library is a monorepo containing multiple packages published in NPM registry.
Packages are stored in packages directory:
Package content description is provided in README.md
files in each package directory.
This monorepo uses NPM workspaces to manage multiple packages within a singular top-level, root package.
To install dependencies for all packages from root package, run:
npm ci
To run any NPM script for specific package from root package, run:
npm run <script-name> --workspace packages/<package-name>
To run any NPM script for all packages only if the script exists, run:
npm run <script-name> --workspaces --if-present
If you want to develop/debug cloudify-ui-common-<package-name>
from the package user side (eg. from [cloudify-stage]
(https://github.com/cloudify-cosmo/cloudify-stage)), then instead of using cloudify-ui-common-<package-name>
package from NPM
registry, you can:
- Use
npm link cloudify-ui-common-<package-name> <local-path-to-cloudify-ui-common-<package-name>>
command in your package user project, - Build
cloudify-ui-common-<package-name>
package (see: Development section), - Run package user project and see changes applied locally in
cloudify-ui-common-<package-name>
package.
The way of work with publishing the package is described below. This section is divided into 3 parts:
- When? - describes when we can publish the package,
- Who? - describes who can publish the package and under which conditions,
- How? - describes technical details to follow to publish the package.
We can release when:
- code on
master
branch is necessary for one of the dependant projects (stage, composer, topology, ...), - fix/feature on
master
branch is finished.
Developers from cloudify-rnd-ui e-mail group can publish new version after agreement with maintainer (see author or maintainers field in package.json file).
This section is divided into two parts:
- Checklist - describes prerquisities to be met before publishing the package,
- Steps - describes technical steps to be executed to publish the package.
- all your changes are merged to
master
branch, so that your localmaster
branch is up-to-date, - you know and follow Semantic Versioning rules when creating new version,
- you know and follow Keep a Changelog guiding principles when adding release notes,
- you have agreement with developers from cloudify-rnd-ui group on publishing new version.
If you met all points from the checklist above, follow these steps:
-
Provide version type and package name to
npm run publish-version
. For example:npm run publish-version minor cypress
- to publish new minor version ofcloudify-ui-common-cypress
packagenpm run publish-version prepatch scripts
- to publish new prerelease patch version ofcloudify-ui-common-scripts
package
It will create special branch, add commit to it containing version bump in
package*.json
files according to your choice, tag the commit and push branch to remote. That should trigger Jenkins jobs finalizing publish. -
Check if Jenkins jobs were successful.
-
Verify that NPM package at
https://www.npmjs.com/package/cloudify-ui-common-<package-name>
was updated properly. -
Go to Create Release page @ GitHub to create release and add release notes according to Keep a Changelog guiding principles (in addition to the types of changes described there, you can use
Internal
type for all non-user-facing changes).