Trying to start storybook from node #27892
-
Hey all! I'm working on migrating a large monorepo from 6.x to latest. One functionality that was being used before was a wrapper around Storybook's cli commands that use the node api to serve or build. Is there any equivalent to this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If I understand what you are asking, you aren't wanting to wrap the cli command, but are wanting to bypass them and call the same function that those parsed arguments would be passed to, right? The build function that is exported from I don't know if there is any documentation for doing that, but the Angular builders bypass the cli and may be useful as an example. |
Beta Was this translation helpful? Give feedback.
If I understand what you are asking, you aren't wanting to wrap the cli command, but are wanting to bypass them and call the same function that those parsed arguments would be passed to, right?
The build function that is exported from
@storybook/core-server
is what I think you want.storybook/code/lib/core-server/src/standalone.ts
Line 5 in 17b7512
I don't know if there is any documentation for doing that, but the Angular builders bypass the cli and may be useful as an example.
storybook/code/frameworks/angular/src/builders/start-storybook/index.ts
Line 198 in 17b7512