Skip to content

Latest commit

 

History

History
92 lines (63 loc) · 3.15 KB

DEVELOPMENT.md

File metadata and controls

92 lines (63 loc) · 3.15 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.

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 the design tokens.
yarn build:tokens
  1. Start the development server.
yarn start:core

This starts the storybook development environment. You can read about how to write storybook stories here. The use of Storybook is recommended for component development.

Commands

Command Description
yarn Install dependencies and link local packages.
yarn build Builds the package.
yarn start Starts the development environment.

Design Tokens

This project uses hds-design-tokens as a dependency. It provides variables for colors, spacing, typography etc. that are used by the core package. Those variables should be used whenever possible. If you need to update or add new tokens, see here.

Remember to always build the tokens after updating or adding new ones, otherwise they won't be available.

Workflow

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

Built with

Git

Pull requests can be submitted from fork. Read more from here.

Developing a feature:

git checkout -b <branchname>
git add <file1> <file2> ...
git commit -m "My commit message"

Pushing your feature to Github:

git checkout develop
git pull
git checkout <branchname>
git rebase -i develop
  • Resolve conflicts and continue:
git add <file1> <file2> ...
git rebase --continue
  • After no conflicts:
git push --force-with-lease

(If your remote does not accept your local new branch: git push -u origin HEAD)

  • Make a Pull Request at Github website.