Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 3 KB

File metadata and controls

66 lines (43 loc) · 3 KB

Contributing

Getting Started

Install

npm install

This will wipe any existing node_modules folder and dependency lock files and do a fresh install of all dependencies.

Start

npm run start

This first remove any existing generated folders and then will run Rollup in watch mode and then start the Storybook dev server. Changes to addon files will take a few seconds to be recompiled into the dist folder which may also kick off a webpack recompile for Storybook. You will need to refresh the browser after the console reads:

created dist\register.js in [N]s

[DateTime] waiting for changes...

Commit

npm run commit

This will:

  • Lint the entire project
  • Run Git's Interactive Staging to select the files to commit
  • Run Prettier on all staged files
  • Run Git CZ for semantic commit messages
  • Push the commit to your current branch

It is important to use this method of committing to maintain code cleanliness, project history, and to release version updates correctly. There is also a mechanism in place to validate commit messages, so it's possible that you'll run into issues trying to commit using a different method.

Upgrade

npm run upgrade

This will run NPM Check in interactive mode. Dependencies and Dev-dependencies will be upgraded and saved with the expected exactness. Be careful to test functionality after running this command.

Dev-dependencies should be installed with an exact version.

Dependencies should be installed with a ^.

Resources

Because documentation is not extensive, having to read through Storybook addons and libs source code is necessary:

It should also be noted that not all available tools will work everywhere. For example, React hooks from the @storybook/addons library will not function on the decorator, but should be used on the panel. It's not always clear when and where things will work so it requires a certain amount of trial and error. Please add to these notes on discovered quirks or undocumented restrictions/features.