Main.js: Combine addons/presets in CLI templates

This commit is contained in:
Michael Shilman 2019-12-31 14:38:45 +08:00
parent d768b53770
commit a289ef64c1
21 changed files with 41 additions and 38 deletions

View File

@ -1,8 +1,4 @@
module.exports = {
stories: ['../src/**/*.stories.ts'],
addons: [
'@storybook/addon-actions/register',
'@storybook/addon-links/register',
'@storybook/addon-notes/register',
],
addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-notes'],
};

View File

@ -1,9 +1,9 @@
module.exports = {
stories: ['../src/**/*.stories.(ts|mdx)'],
addons: [
'@storybook/addon-actions/register',
'@storybook/addon-links/register',
'@storybook/addon-notes/register',
'@storybook/addon-docs',
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/addon-notes',
],
presets: ['@storybook/addon-docs/preset'],
};

View File

@ -1,4 +1,4 @@
module.exports = {
stories: ['../stories/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
};

View File

@ -1,4 +1,4 @@
module.exports = {
stories: ['../stories/**/*.stories.(js|mdx)'],
presets: ['@storybook/addon-docs/preset'],
addons: ['@storybook/addon-docs'],
};

View File

@ -1,4 +1,4 @@
module.exports = {
stories: ['../stories/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-knobs/register'],
addons: ['@storybook/addon-actions', '@storybook/addon-knobs'],
};

View File

@ -1,4 +1,4 @@
module.exports = {
stories: ['../stories/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-knobs/register'],
addons: ['@storybook/addon-actions', '@storybook/addon-knobs'],
};

View File

@ -1,4 +1,4 @@
module.exports = {
stories: ['../stories/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-knobs/register'],
addons: ['@storybook/addon-actions', '@storybook/addon-knobs'],
};

View File

@ -1,4 +1,4 @@
module.exports = {
stories: ['../stories/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
};

View File

@ -1,4 +1,4 @@
module.exports = {
stories: ['../stories/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
};

View File

@ -1,9 +1,10 @@
module.exports = {
stories: ['../stories/**/*.stories.(js|mdx)'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
presets: [
addons: [
'@storybook/addon-actions',
'@storybook/addon-links',
{
name: '@storybook/addon-docs/preset',
name: '@storybook/addon-docs',
options: { configureJSX: true },
},
],

View File

@ -1,5 +1,8 @@
module.exports = {
stories: ['../src/**/*.stories.(ts|tsx|js|jsx)'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
presets: ['@storybook/preset-create-react-app'],
addons: [
'@storybook/preset-create-react-app',
'@storybook/addon-actions',
'@storybook/addon-links',
],
};

View File

@ -1,5 +1,8 @@
module.exports = {
stories: ['../src/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
presets: ['@storybook/preset-create-react-app'],
addons: [
'@storybook/preset-create-react-app',
'@storybook/addon-actions',
'@storybook/addon-links',
],
};

View File

@ -1,10 +1,11 @@
module.exports = {
stories: ['../src/**/*.stories.(js|mdx)'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
presets: [
addons: [
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/preset-create-react-app',
{
name: '@storybook/addon-docs/preset',
name: '@storybook/addon-docs',
options: {
configureJSX: true,
},

View File

@ -1,4 +1,4 @@
module.exports = {
stories: ['../stories/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
};

View File

@ -1,4 +1,4 @@
module.exports = {
stories: ['../src/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
};

View File

@ -1,5 +1,4 @@
module.exports = {
stories: ['../src/**/*.stories.(js|mdx)'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
presets: ['@storybook/addon-docs/preset'],
addons: ['@storybook/addon-docs', '@storybook/addon-actions', '@storybook/addon-links'],
};

View File

@ -1,4 +1,4 @@
module.exports = {
stories: ['../stories/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
};

View File

@ -1,4 +1,4 @@
module.exports = {
stories: ['../stories/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
};

View File

@ -1,5 +1,4 @@
module.exports = {
stories: ['../stories/**/*.stories.(js|mdx)'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
presets: ['@storybook/addon-docs/preset'],
addons: ['@storybook/addon-docs', '@storybook/addon-actions', '@storybook/addon-links'],
};

View File

@ -1,6 +1,6 @@
module.exports = {
stories: ['../stories/**/*.stories.js'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
webpack: async config => {
// do mutation to the config

View File

@ -1,9 +1,10 @@
module.exports = {
stories: ['../stories/**/*.stories.(js|mdx)'],
addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'],
presets: [
addons: [
'@storybook/addon-actions',
'@storybook/addon-links',
{
name: '@storybook/addon-docs/preset',
name: '@storybook/addon-docs',
options: { configureJSX: true },
},
],