yarn install
yarn lint
yarn build-storybook
yarn serve-storybook
This opens up localhost:6006
. If you are running this on the workspace container of the OpenDialog Dev Environment,
port 6006 is exposed for this reason.
Before publishing to NPM, you can use this package locally in an instance of OpenDialog by running the following (all from within the OpenDialog Dev Environment workspace container):
- Firstly insure that all dependencies are installed locally in the design system with
yarn install
- In
/var/www/opendialog-design-system
runyarn link
. This makes the package available locally - In
/var/www/opendialog
runyarn link @opendialogai/opendialog-design-system-pkg
. This links the local package - Finally run
yarn run dev
oryarn watch
which will automatically rebuild any changes made in this package
The -s .public
directive has been added to the storybook serve command. This will serve all the assets with the .public
directory and make them publicly available for your components
There is a job in the CircleCI config npm_publish
that will check if there is a git tag on the current commit, and if so, use that to push a new version to NPM.
Releasing the OpenDialog Design System uses a package called release-it
- ensure that the branch you are intending to release from is clean
- on the command line, run
npm run release
- you can then choose how you wish to bump the version or whether you want to generate a pre-release
- executing the script will:
- set the new version in package.json
- generate an updated changelog
- publish the new version to NPM (optionally)
- commit the release changes (optionally)
- tag (optionally)
- push (optionally)
- create a github release (optionally)
- Once it is published, update the dependency in OpenDialog app
The npm run release
script will use the .npmrc
file that expects an env with the name NPM_TOKEN
to be present