Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Add STORYBOOK environment variable #12997

Merged

Conversation

toshi1127
Copy link
Contributor

@toshi1127 toshi1127 commented Nov 3, 2020

Issue: #12416

What I did

By Default, the environment variable STORYBOOK is set to true.

How to test

  • Is this testable with Jest or Chromatic screenshots?
    yes.
    I have tested that process.env.STORYBOOK is set to true.
    image

  • Does this need a new example in the kitchen sink apps?

  • Does this need an update to the documentation?
    Should I update this document?

@shilman
Copy link
Member

shilman commented Nov 4, 2020

@tmeasday WDYT? seems reasonable but I'm a little unclear on the use case

@tmeasday
Copy link
Member

tmeasday commented Nov 4, 2020

Sure, seems reasonable to me

@shilman shilman changed the title feat: issue #12416 - add default environment variable Core: Add STORYBOOK environment variable Nov 4, 2020
@shilman shilman added this to the 6.1 core milestone Nov 4, 2020
@shilman
Copy link
Member

shilman commented Nov 4, 2020

Aha @toshi1127 this got converted to TS recently. Any chance you can redo the PR in the new files?

@shilman shilman added the tracked label Nov 4, 2020
@toshi1127
Copy link
Contributor Author

@shilman
Of course.
I've fixed the same in the new file!

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @toshi1127 -- looking good!

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @toshi1127 -- looking good!

@tremby
Copy link

tremby commented May 11, 2022

Did this feature disappear? I need to change some postcss config for Storybook only, but in postcss.config.js process.env.STORYBOOK is undefined.

@oriooctopus
Copy link

Yeah, I'm also not seeing this anymore @shilman. Version 6.4.7

@ghost
Copy link

ghost commented Jul 20, 2022

I found the current source
It's not working, but ...

version 6.5.9

https://github.com/storybookjs/storybook/blob/next/lib/core-common/src/utils/envs.ts#L15

@ghost ghost mentioned this pull request Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants