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 / Addon-docs: Cleanup framework-specific presets #8782

Merged
merged 3 commits into from
Nov 11, 2019

Conversation

shilman
Copy link
Member

@shilman shilman commented Nov 11, 2019

Issue: N/A

Pre-work for #5731

What I did

  • Add a framework option to presets
  • Update addon-docs to use framework option, unifying the docs preset
  • Deprecate addon-docs framework-specific presets
  • Update documentation

How to test

Try out:

  • official-storybook
  • vue-kitchen-sink
  • angular-cli
  • etc.

@vercel
Copy link

vercel bot commented Nov 11, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/storybook/monorepo/g4hua6sud
🌍 Preview: https://monorepo-git-5731-cleanup-framework-specfic-presets.storybook.now.sh

@shilman shilman requested a review from tmeasday November 11, 2019 07:00
Copy link
Member

@mrmckeb mrmckeb left a comment

Choose a reason for hiding this comment

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

Looks great, it would be great to get rid of some of the any's here, but I think that's a bigger task.

import * as common from './preset';
import deprecate from 'util-deprecate';
import dedent from 'ts-dedent';
import * as common from '../../preset';
Copy link
Member

Choose a reason for hiding this comment

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

You can avoid this by enabling ESM interop in TypeScript.

}

export function addons(entry: any[] = []) {
export function addons(entry: any[] = [], options: any) {
Copy link
Member

Choose a reason for hiding this comment

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

We need to look at some global types for options, etc.

@@ -0,0 +1,8 @@
export function webpack(webpackConfig: any = {}, options: any = {}) {
Copy link
Member

Choose a reason for hiding this comment

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

There is a type for Webpack config, Configuration from webpack.

@@ -0,0 +1,8 @@
export function webpack(webpackConfig: any = {}, options: any = {}) {
webpackConfig.module.rules.push({
Copy link
Member

Choose a reason for hiding this comment

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

better to make this pure.

@shilman shilman added this to the 5.3.0 milestone Nov 11, 2019
@shilman shilman changed the title Presets: Cleanup framework-specific presets Presets / Addon-docs: Cleanup framework-specific presets Nov 11, 2019
@shilman shilman merged commit 14a449b into next Nov 11, 2019
@shilman shilman deleted the 5731-cleanup-framework-specfic-presets branch November 11, 2019 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: docs maintenance User-facing maintenance tasks presets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants