Skip to content

Latest commit

 

History

History
75 lines (51 loc) · 3.2 KB

DEVELOPMENT.md

File metadata and controls

75 lines (51 loc) · 3.2 KB

Development

Development environment

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).

Prerequisites

Setting up local development environment

  1. Clone the HDS repository.
git clone https://github.com/City-of-Helsinki/helsinki-design-system.git
  1. Go to the root of the project and install dependencies with yarn.
cd helsinki-design-system
yarn
  1. Build packages with yarn build. This builds all packages; core, react, design-tokens, and site (documentation).
yarn build
  1. 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

Commands

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 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.

Workflow

This project uses the Git Feature Branch Workflow. Happy branching!

  1. Get the latest updates from the development branch. The master branch is only updated during the release process containing the latest released features while development branch has the latest features waiting for a new release.
git checkout development
git pull
  1. Create a new branch for your changes.
git checkout -b hds-<Ticket number>-<Pull request title>
  1. Push changes to the HDS remote repository.
git push --set-upstream origin hds-<Ticket number>-<Pull request title>
  1. Make a Pull Request on the HDS Github website.