[Feature Request] use different projects for configuring storybook
See original GitHub issuePrerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- I am running the latest version
- I checked the documentation (nx.dev) and found no answer
- I checked to make sure that this issue has not already been filed
- I’m reporting the issue to the correct repository (not related to React, Angular or any dependency)
Expected Behavior
In my monorepo setup I have multiple angular projects all using the same UI library but with different theming that is realized by importing scss partials.
When running storybook for the UI library I would like an easy was to switch between themes. Not necessarily during runtime some config option would suffice.
Right now I get the following output in the console:
info => Using angular project 'some-project-name' for configuring Storybook.
So I guess it would be enough to have an option for saying which project storybook should use.
Or maybe there is already a way to do this and I couldn’t find it?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Configure Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >Storybook Composition
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >Publish Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >Docs Addon | Storybook: Frontend workshop for UI development
The addon-docs preset has a few configuration options that can be used to configure its babel/webpack loading behavior. Here's an example of how...
Read more >Distribute UI across an organization - Storybook Tutorials
Adding the refs key to .storybook/main.js , allows us to compose multiple Storybooks into one. This is helpful when working with big projects...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Starting at version 6.1.0 of storybook was introduced an env variable named
STORYBOOK_ANGULAR_PROJECT
.In the main.js config of any .storybook folder you can set this env variable with the
angular project
you need, just like this:process.env.STORYBOOK_ANGULAR_PROJECT = 'your-project-name';
Here is the link to the pull request that introduced this feature:
https://github.com/storybookjs/storybook/pull/12565
This is an issue with @storybook/angular not nx.
https://github.com/storybookjs/storybook/blob/next/app/angular/src/server/angular-cli_config.ts#L73
My hack (add to anuglar.json)