web: add Storybook workspace level commands
Created by: valerybugakov
Context
The default yarn storybook
command loads all stories defined in our monorepo. Often it's not required to load all of them to implement a particular feature. Loading only a subset of stories greatly increases Storybook development server performance. This PR introduces the environment variable to load a subset of all stories and a list of predefined npm scripts to use this environment variable.
Changes
- Added
STORIES_GLOB
environment variable support to the Storybook config to load only a subset of all stories. - Added npm scripts to start Storybook development server for a particular package.
- Added Storybook section to the web app "Local Development" documentation.
Timings
Examples to better understand the time required for different packages:
yarn storybook
yan storybook:web
yan storybook:branded
yan storybook:wildcard