Skip to content

Commit

Permalink
Merge pull request #3068 from storybooks/avoid-mixing-manager-and-pre…
Browse files Browse the repository at this point in the history
…view

Addons: avoid mixing manager and preview code together
# Conflicts:
#	addons/storysource/register.js
#	addons/storysource/src/index.js
  • Loading branch information
Hypnosphi committed Mar 6, 2018
1 parent 7730400 commit e8edea6
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion addons/actions/register.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require('./dist').register();
require('./dist/manager').register();
1 change: 0 additions & 1 deletion addons/actions/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ export const ADDON_ID = 'storybook/actions';
export const PANEL_ID = `${ADDON_ID}/actions-panel`;
export const EVENT_ID = `${ADDON_ID}/action-event`;

export { register } from './manager';
export { action, decorateAction } from './preview';
4 changes: 2 additions & 2 deletions addons/events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Then create a file called `addons.js` in your storybook config.
Add following content to it:

```js
import '@storybook/addon-actions';
import '@storybook/addon-links';
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';
import '@storybook/addon-events/register';
```

Expand Down
2 changes: 1 addition & 1 deletion addons/events/register.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require('./dist').register();
require('./dist/manager').register();
2 changes: 0 additions & 2 deletions addons/events/src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export default from './preview';

export { register } from './manager';
2 changes: 1 addition & 1 deletion addons/links/register.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require('./dist').register();
require('./dist/manager').register();
1 change: 0 additions & 1 deletion addons/links/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export const EVENT_ID = `${ADDON_ID}/link-event`;
export const REQUEST_HREF_EVENT_ID = `${ADDON_ID}/request-href-event`;
export const RECEIVE_HREF_EVENT_ID = `${ADDON_ID}/receive-href-event`;

export { register } from './manager';
export { linkTo, hrefTo } from './preview';

let hasWarned = false;
Expand Down

0 comments on commit e8edea6

Please sign in to comment.