Add pkg.bin section with commands to run
Example @storybook/react/package.json:
"bin": {
"build-storybook": "./dist/server/build.js",
"start-storybook": "./dist/server/index.js",
"storybook-server": "./dist/server/index.js"
},
-
storybook (for running the storybook in development) -
build-storybook (building a static storybook page from hosting) -
build (building a lib with components, so it can be published & imported via npm/git)
Also read this: https://docs.npmjs.com/misc/scripts