question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Excluding a story from build

See original GitHub issue

Is your feature request related to a problem? Please describe. I would like to exclude a story from the build without removing the MyComponent.story.jsx file or changing storybook configs.

This is for a scenario where I would like to keep a check in a WIP story but prevent it from being surfaced to other engineers while our team works on it.

Describe the solution you’d like Maybe a .hide() feature that can be used like this:

storiesOf('MyComponent', module)
  .add('without props', () => (<MyComponent />))
  .hide() // exclude from build

or testing framework style of:

storiesOf('MyComponent', module)
  .xadd('without props', () => (<MyComponent />))

Describe alternatives you’ve considered I can probably exclude the story filename in the config, but it is not obvious and it would be ideal as the status of a story is not obvious from just looking at the story source code only.

Also happy to hear other workarounds that people have used. I considered changing the file extension to something else like MyComponent.stories.pending.jsx so it doesn’t get picked up by Storybook but this seems like an arbitrary way to do it.

Are you able to assist bring the feature to reality? yes

Additional context I am still on Storybook 3.4.11.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:17
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
shilmancommented, Apr 18, 2019

I like xadd 😃

0reactions
shilmancommented, Mar 21, 2020

Please upvote the issue if you think it’s useful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exclude Us From Novels - The Editor's Blog
Use this list to safely exclude unnecessary elements from fiction. ... Some options can weaken a story or drain the punch from a...
Read more >
Exclude Project in Visual Studio Team Services (VSTS) Build
You can exclude project from Visual Studio Team Services build definition if required. You can build a solution without building all projects that...
Read more >
next build command is not ignoring *.stories.tsx files [duplicate]
Running next build fails because of typescript errors in these stories. I want next to ignore storybook files. Is it possible and if...
Read more >
Exclude test files from Compilation in TypeScript | bobbyhadz
The exclude array in the tsconfig. build. json file in the example assumes that you place your test files in the src directory...
Read more >
EXCLUDE Level of Detail Expressions - Tableau Help
Start Building a Viz by Dragging Fields to the View. Use Axes and Multiple Measures in a View · Add Visual Detail. About...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found