Helsinki Design System uses Lerna for running scripts across the repo as well as versioning and creating releases of the packages. Yarn workspaces is used to manage dependencies. This allows the separate packages to reference each other via symlinks during local development. Nvm is a node version manager used to specify the preferred node version across the project (optional but highly recommended, if not used, see the preferred version in .nvmrc file).
- Clone the HDS repository.
git clone https://github.com/City-of-Helsinki/helsinki-design-system.git
- Go to the root of the project and install dependencies with
yarn
.
cd helsinki-design-system
yarn
- Build packages with
yarn build
. This builds all packages; core, react, design-tokens, and site (documentation).
yarn build
- Start the development server. You can start these individually for each platform with
yarn start:<platform>
. For example, to start the React Storybook development environment, run:
yarn start:react
Command | Description |
---|---|
yarn | Installs dependencies and links local packages. |
yarn build | Builds all the packages. |
yarn build:<package> | Builds a specific package (tokens , core , react , hds-js or site ). |
yarn start:<platform> | Starts the development environment for a specific platform (core or react ). |
release | Publishes packages that have changed since the last release. |
update-versions | Bump version of packages to publish. |
This project uses the Git Feature Branch Workflow. Happy branching!
- Get the latest updates from the
development
branch. Themaster
branch is only updated during the release process containing the latest released features whiledevelopment
branch has the latest features waiting for a new release.
git checkout development
git pull
- Create a new branch for your changes.
git checkout -b hds-<Ticket number>-<Pull request title>
- Push changes to the HDS remote repository.
git push --set-upstream origin hds-<Ticket number>-<Pull request title>
- Make a Pull Request on the HDS Github website.