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

Presets - Add "addons" and "config" to preset extensions #4240

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

igor-dv
Copy link
Member

@igor-dv igor-dv commented Sep 27, 2018

I've played a bit with presets and realized that having more granular extensions for addons and config will be very helpful for creating presets.

For example, we can expose our addons as presets, i.e. using them like this:

// presets.js (or a future storybook.config.js)
[
  `@storybook/addon-vieports/preset`
]

// or with default params
[
  name: `@storybook/addon-vieports/preset`,
  options: { /* whatever this addon needs */ }
]

Same thing with a config.js file. Today we enforce people to create config.js in order to call the configure(loadStories, module);

We can create a preset that does it. One may use require.context or some other techniques.

@pksunkara pksunkara merged commit 5638539 into master Sep 27, 2018
@pksunkara pksunkara deleted the presets/addons-and-configs-extensions branch September 27, 2018 13:00
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.

2 participants