CADS Blocks library for webportal
Install the library with Yarn:
yarn add @ecmwf-projects/cads-blocks-libraryor with NPM:
npm install @ecmwf-projects/cads-blocks-libraryThen, import the desired component into your project:
import { GenerateBlocks } from '@ecmwf-projects/cads-blocks-library'Increment the desired Semver version where the version can be one of --major, --minor, --patch. Run yarn version -h for a full list of flags:
yarn version --minorThis will also publish a release tag via postversion script.
The tag will trigger the related Github actions for publishing to the desired package registry.
To publish a pre-release, add --pre to the flag:
yarn version --preminor
# or
yarn version --premajorLocal package development:
In order to install this package locally (while developing) in the same way as publishing, we can package it and install in webportal:
npm run build
npm pack
This will create a ecmwf-projects-cads-blocks-...-.tgz. Add to the dependencies of cads-webportal:
Something like this:
"dependencies": {
"@ecmwf-projects/cads-blocks-library": "file:/path/to/cads-blocks-library/ecmwf-projects-cads-blocks-library-3.0.5.tgz",
}
Issue yarn install.