Sure, here are the commands with single-line explanations:
-
yarn init
- Initializes a new Yarn project, creating a
package.json
file.
- Initializes a new Yarn project, creating a
-
yarn add react react-dom --peer
- Adds
react
andreact-dom
as peer dependencies, expecting them to be provided by the consuming project.
- Adds
-
yarn add react react-dom esbuild -D
- Adds
react
,react-dom
, andesbuild
as development dependencies for the project.
- Adds
-
npx sb init
- Add Storybook in react project , select webpack 5
-
create useScroller.stories.js story in src/stories
-
yarn storybook
to run the example -
Setting up esbuild
- install esbuild as dev dependencies
yarn add esbuild --dev
- add scripts for build
- Building multiple js Modules - read JSmodules.md