$ cnpm install @storybook/core
The @storybook/core package is the core of Storybook. It is responsible for the following:
This package is not intended to be used by anyone but storybook internally.
Even though this is where all of the code is located, it is NOT to be the entry point when using functionality within!
Consumers of the code should import like so:
import { addons } from 'storybook/internal/manager-api';
Importing from @storybook/core is explicitly NOT supported; it WILL break in a future version of storybook, very likely in a non-major version bump.
@storybook/coreIn the following packages you should import from @storybook/core (and ONLY from @storybook/core):
@storybook/core@storybook/codemodTo prevent cyclical dependencies, these packages cannot depend on the storybook package.
storybook/internalIn every other package you should import from storybook/internal (and ONLY from storybook/internal).
The heuristic is simple:
If you see a peerDependency on
storybookin thepackage.jsonof the package you are working on, you should import fromstorybook/internal.
storybook package itselfThe sole exception is the storybook package itself.
Obviously, the storybook package cannot depend on itself, so it must import from @storybook/core.
Copyright 2013 - present © cnpmjs.org | Home |