change addon-actions to new structure

This commit is contained in:
Norbert de Langen 2022-03-18 12:30:24 +01:00
parent 2288a26302
commit fd79ffb447
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762
6 changed files with 10 additions and 17 deletions

View File

@ -0,0 +1 @@
module.exports = require('./dist/esm/manager');

View File

@ -43,6 +43,7 @@
"dependencies": {
"@storybook/addons": "6.5.0-alpha.49",
"@storybook/api": "6.5.0-alpha.49",
"@storybook/client-logger": "6.5.0-alpha.49",
"@storybook/components": "6.5.0-alpha.49",
"@storybook/core-events": "6.5.0-alpha.49",
"@storybook/csf": "0.0.2--canary.87bc651.0",

View File

@ -1,16 +0,0 @@
function managerEntries(entry, options) {
return [...entry, require.resolve('./dist/esm/manager')];
}
function config(entry = [], { addDecorator = true } = {}) {
const actionConfig = [];
if (addDecorator) {
actionConfig.push(require.resolve('./dist/esm/preset/addDecorator'));
}
return [...entry, ...actionConfig, require.resolve('./dist/esm/preset/addArgs')];
}
module.exports = {
managerEntries,
config,
};

View File

@ -0,0 +1 @@
module.exports = require('./dist/esm/preset/preview');

View File

@ -1 +1,5 @@
require('./dist/esm/manager');
require('@storybook/client-logger').once.warn(
'register.js is deprecated see https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-registerjs'
);
require('./manager');

View File

@ -0,0 +1,2 @@
export * from './addDecorator';
export * from './addArgs';