Skip to content

Commit

Permalink
Merge pull request #17875 from storybookjs/core-client
Browse files Browse the repository at this point in the history
Core: Avoid framework imports from core/client
  • Loading branch information
shilman committed Apr 14, 2022
1 parent a2b71a5 commit 2c20cad
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 19 deletions.
4 changes: 2 additions & 2 deletions app/angular/src/client/preview/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable prefer-destructuring */
import { ClientStoryApi, Loadable } from '@storybook/addons';
import { start } from '@storybook/core/client';
import type { ClientStoryApi, Loadable } from '@storybook/addons';
import { start } from '@storybook/core';
import './globals';
import { renderToDOM, render } from './render';
import decorateStory from './decorateStory';
Expand Down
2 changes: 1 addition & 1 deletion app/ember/src/client/preview/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { start } from '@storybook/core/client';
import { start } from '@storybook/core';

import './globals';
import { renderToDOM } from './render';
Expand Down
4 changes: 2 additions & 2 deletions app/html/src/client/preview/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable prefer-destructuring */
import { start } from '@storybook/core/client';
import { ClientStoryApi, Loadable } from '@storybook/addons';
import { start } from '@storybook/core';
import type { ClientStoryApi, Loadable } from '@storybook/addons';
import { HtmlFramework } from './types-6-0';

import './globals';
Expand Down
4 changes: 2 additions & 2 deletions app/preact/src/client/preview/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable prefer-destructuring */
import { start } from '@storybook/core/client';
import { ClientStoryApi, Loadable } from '@storybook/addons';
import { start } from '@storybook/core';
import type { ClientStoryApi, Loadable } from '@storybook/addons';

import './globals';
import { renderToDOM } from './render';
Expand Down
2 changes: 1 addition & 1 deletion app/react/src/client/preview/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable prefer-destructuring */
import { start } from '@storybook/core/client';
import { start } from '@storybook/core';
import { ClientStoryApi, Loadable } from '@storybook/addons';

import './globals';
Expand Down
4 changes: 2 additions & 2 deletions app/server/src/client/preview/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { start } from '@storybook/core/client';
import { ClientStoryApi, Loadable } from '@storybook/addons';
import { start } from '@storybook/core';
import type { ClientStoryApi, Loadable } from '@storybook/addons';

import './globals';
import { renderToDOM, render } from './render';
Expand Down
2 changes: 1 addition & 1 deletion app/svelte/src/client/preview/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { start } from '@storybook/core/client';
import { start } from '@storybook/core';
import { decorateStory } from './decorators';

import './globals';
Expand Down
4 changes: 2 additions & 2 deletions app/vue/src/client/preview/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable prefer-destructuring */
import { start } from '@storybook/core/client';
import { ClientStoryApi, Loadable } from '@storybook/addons';
import { start } from '@storybook/core';
import type { ClientStoryApi, Loadable } from '@storybook/addons';

import './globals';
import { IStorybookSection } from './types';
Expand Down
4 changes: 2 additions & 2 deletions app/vue3/src/client/preview/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { App } from 'vue';
import { start } from '@storybook/core/client';
import { ClientStoryApi, Loadable } from '@storybook/addons';
import { start } from '@storybook/core';
import type { ClientStoryApi, Loadable } from '@storybook/addons';

import './globals';
import { IStorybookSection } from './types';
Expand Down
4 changes: 2 additions & 2 deletions app/web-components/src/client/preview/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable prefer-destructuring */
import { start } from '@storybook/core/client';
import { ClientStoryApi, Loadable } from '@storybook/addons';
import { start } from '@storybook/core';
import type { ClientStoryApi, Loadable } from '@storybook/addons';

import './globals';
import { renderToDOM } from './render';
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/common/storybook-client-preview.ts.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
```ts
// your-framework/src/client/preview/index.ts

import { start } from '@storybook/core/client';
import { start } from '@storybook/core';

import './globals';

Expand Down
4 changes: 3 additions & 1 deletion lib/core/client.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module.exports = require('./dist/cjs/index');
// @storybook/core was split into core-client and core-server. This file is for backwards-compat.
// TODO: remove in 7.0
module.exports = require('./dist/esm/index');

0 comments on commit 2c20cad

Please sign in to comment.