Make sure node
and pnpm 8
is installed. You can do this by running:
node --version && yarn --version
(run command from root of the project)
pnpm install
Serve Storybook on localhost:
yarn storybook
This ropo uses the Conventional Commits specification in order to create nice and readable changelogs. The Semantic Versioning 2.0 specification is used for versioning.
Follow these steps if you want to release a new version of the packages with Lerna. Make sure you are in the main branch when doing so, to ensure the changelogs are generated correctly.
Build distribution files for all the packages. Make sure they all run successfully before proceeding to next step.
pnpm build
This suggests new versions (click enter), creates a new tag and commit with the changes and pushes them to git. The new version-numbers for the packages are automatically created based on the commit messages. Only non-private packages will be handled (package.json).
pnpm lerna:version
Publish the packages to NPM. Make sure you are logged in to your NPM account from the terminal you are trying to publish from. Your account also has to be added to the Digdir organisation on NPM.
pnpm lerna:publish
CSS modules are used for styling in this library. Camelcase is used as the naming convention for the classes.
Run the following command to start the tests using React Testing Library
pnpm test