diff --git a/lib/cli/generators/ANGULAR/template-csf/.storybook/addons.js b/lib/cli/generators/ANGULAR/template-csf/.storybook/addons.js deleted file mode 100644 index 47eabe0ce40..00000000000 --- a/lib/cli/generators/ANGULAR/template-csf/.storybook/addons.js +++ /dev/null @@ -1,3 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; -import '@storybook/addon-notes/register'; diff --git a/lib/cli/generators/ANGULAR/template-csf/.storybook/config.js b/lib/cli/generators/ANGULAR/template-csf/.storybook/config.js deleted file mode 100644 index b9f8d0322eb..00000000000 --- a/lib/cli/generators/ANGULAR/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/angular'; - -// automatically import all files ending in *.stories.ts -configure(require.context('../src/stories', true, /\.stories\.ts$/), module); diff --git a/lib/cli/generators/ANGULAR/template-csf/.storybook/main.js b/lib/cli/generators/ANGULAR/template-csf/.storybook/main.js new file mode 100644 index 00000000000..fd9bed78b54 --- /dev/null +++ b/lib/cli/generators/ANGULAR/template-csf/.storybook/main.js @@ -0,0 +1,8 @@ +module.exports = { + stories: ['../src/stories/**/*.stories.ts'], + addons: [ + '@storybook/addon-actions/register', + '@storybook/addon-links/register', + '@storybook/addon-notes/register', + ], +}; diff --git a/lib/cli/generators/ANGULAR/template-mdx/.storybook/addons.js b/lib/cli/generators/ANGULAR/template-mdx/.storybook/addons.js deleted file mode 100644 index 47eabe0ce40..00000000000 --- a/lib/cli/generators/ANGULAR/template-mdx/.storybook/addons.js +++ /dev/null @@ -1,3 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; -import '@storybook/addon-notes/register'; diff --git a/lib/cli/generators/ANGULAR/template-mdx/.storybook/config.js b/lib/cli/generators/ANGULAR/template-mdx/.storybook/config.js deleted file mode 100644 index f1689d243bd..00000000000 --- a/lib/cli/generators/ANGULAR/template-mdx/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/angular'; - -// automatically import all files ending in *.stories.ts -configure(require.context('../src/stories', true, /\.stories\.(ts|mdx)$/), module); diff --git a/lib/cli/generators/ANGULAR/template-mdx/.storybook/main.js b/lib/cli/generators/ANGULAR/template-mdx/.storybook/main.js new file mode 100644 index 00000000000..6df0a6fe46b --- /dev/null +++ b/lib/cli/generators/ANGULAR/template-mdx/.storybook/main.js @@ -0,0 +1,9 @@ +module.exports = { + stories: ['../src/stories/**/*.stories.(ts|mdx)'], + addons: [ + '@storybook/addon-actions/register', + '@storybook/addon-links/register', + '@storybook/addon-notes/register', + ], + presets: ['@storybook/addon-docs/preset'], +}; diff --git a/lib/cli/generators/ANGULAR/template-mdx/.storybook/presets.js b/lib/cli/generators/ANGULAR/template-mdx/.storybook/presets.js deleted file mode 100644 index a04174c7a33..00000000000 --- a/lib/cli/generators/ANGULAR/template-mdx/.storybook/presets.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = ['@storybook/addon-docs/preset']; diff --git a/lib/cli/generators/EMBER/template-csf/.storybook/addons.js b/lib/cli/generators/EMBER/template-csf/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/EMBER/template-csf/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/EMBER/template-csf/.storybook/config.js b/lib/cli/generators/EMBER/template-csf/.storybook/config.js deleted file mode 100644 index e2271088fc6..00000000000 --- a/lib/cli/generators/EMBER/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/ember'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/EMBER/template-csf/.storybook/main.js b/lib/cli/generators/EMBER/template-csf/.storybook/main.js new file mode 100644 index 00000000000..448921317f4 --- /dev/null +++ b/lib/cli/generators/EMBER/template-csf/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], +}; diff --git a/lib/cli/generators/HTML/template-csf/.storybook/config.js b/lib/cli/generators/HTML/template-csf/.storybook/config.js deleted file mode 100644 index 055d4e30181..00000000000 --- a/lib/cli/generators/HTML/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/html'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/HTML/template-csf/.storybook/main.js b/lib/cli/generators/HTML/template-csf/.storybook/main.js new file mode 100644 index 00000000000..77857c48de3 --- /dev/null +++ b/lib/cli/generators/HTML/template-csf/.storybook/main.js @@ -0,0 +1,3 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], +}; diff --git a/lib/cli/generators/HTML/template-mdx/.storybook/config.js b/lib/cli/generators/HTML/template-mdx/.storybook/config.js deleted file mode 100644 index 0c2a58cfec2..00000000000 --- a/lib/cli/generators/HTML/template-mdx/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/html'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.(js|mdx)$/), module); diff --git a/lib/cli/generators/HTML/template-mdx/.storybook/main.js b/lib/cli/generators/HTML/template-mdx/.storybook/main.js new file mode 100644 index 00000000000..5e26231adcc --- /dev/null +++ b/lib/cli/generators/HTML/template-mdx/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../stories/**/*.stories.(js|mdx)'], + presets: ['@storybook/addon-docs/preset'], +}; diff --git a/lib/cli/generators/HTML/template-mdx/.storybook/presets.js b/lib/cli/generators/HTML/template-mdx/.storybook/presets.js deleted file mode 100644 index a04174c7a33..00000000000 --- a/lib/cli/generators/HTML/template-mdx/.storybook/presets.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = ['@storybook/addon-docs/preset']; diff --git a/lib/cli/generators/MARKO/template-csf/.storybook/addons.js b/lib/cli/generators/MARKO/template-csf/.storybook/addons.js deleted file mode 100644 index 218bf7a5e66..00000000000 --- a/lib/cli/generators/MARKO/template-csf/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-knobs/register'; diff --git a/lib/cli/generators/MARKO/template-csf/.storybook/config.js b/lib/cli/generators/MARKO/template-csf/.storybook/config.js deleted file mode 100644 index cc728acf6bc..00000000000 --- a/lib/cli/generators/MARKO/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/marko'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/MARKO/template-csf/.storybook/main.js b/lib/cli/generators/MARKO/template-csf/.storybook/main.js new file mode 100644 index 00000000000..d8c8832bf86 --- /dev/null +++ b/lib/cli/generators/MARKO/template-csf/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-knobs/register'], +}; diff --git a/lib/cli/generators/METEOR/template-csf/.storybook/addons.js b/lib/cli/generators/METEOR/template-csf/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/METEOR/template-csf/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/METEOR/template-csf/.storybook/config.js b/lib/cli/generators/METEOR/template-csf/.storybook/config.js deleted file mode 100644 index 0603ed51131..00000000000 --- a/lib/cli/generators/METEOR/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/react'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/METEOR/template-csf/.storybook/main.js b/lib/cli/generators/METEOR/template-csf/.storybook/main.js new file mode 100644 index 00000000000..d8c8832bf86 --- /dev/null +++ b/lib/cli/generators/METEOR/template-csf/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-knobs/register'], +}; diff --git a/lib/cli/generators/MITHRIL/template-csf/.storybook/addons.js b/lib/cli/generators/MITHRIL/template-csf/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/MITHRIL/template-csf/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/MITHRIL/template-csf/.storybook/config.js b/lib/cli/generators/MITHRIL/template-csf/.storybook/config.js deleted file mode 100644 index a56f1e3c442..00000000000 --- a/lib/cli/generators/MITHRIL/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/mithril'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/MITHRIL/template-csf/.storybook/main.js b/lib/cli/generators/MITHRIL/template-csf/.storybook/main.js new file mode 100644 index 00000000000..d8c8832bf86 --- /dev/null +++ b/lib/cli/generators/MITHRIL/template-csf/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-knobs/register'], +}; diff --git a/lib/cli/generators/POLYMER/template-csf/.storybook/config.js b/lib/cli/generators/POLYMER/template-csf/.storybook/config.js deleted file mode 100644 index 89ffce5d2c3..00000000000 --- a/lib/cli/generators/POLYMER/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/polymer'; - -// automatically import all files ending in *.stories.js -configure(require.context('../src/stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/POLYMER/template-csf/.storybook/main.js b/lib/cli/generators/POLYMER/template-csf/.storybook/main.js new file mode 100644 index 00000000000..c0c5891e74c --- /dev/null +++ b/lib/cli/generators/POLYMER/template-csf/.storybook/main.js @@ -0,0 +1,3 @@ +module.exports = { + stories: ['../src/stories/**/*.stories.js'], +}; diff --git a/lib/cli/generators/PREACT/template-csf/.storybook/addons.js b/lib/cli/generators/PREACT/template-csf/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/PREACT/template-csf/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/PREACT/template-csf/.storybook/config.js b/lib/cli/generators/PREACT/template-csf/.storybook/config.js deleted file mode 100644 index 564558bd8d7..00000000000 --- a/lib/cli/generators/PREACT/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/preact'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/PREACT/template-csf/.storybook/main.js b/lib/cli/generators/PREACT/template-csf/.storybook/main.js new file mode 100644 index 00000000000..448921317f4 --- /dev/null +++ b/lib/cli/generators/PREACT/template-csf/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], +}; diff --git a/lib/cli/generators/RAX/template-csf/.storybook/manager.js b/lib/cli/generators/RAX/template-csf/.storybook/manager.js deleted file mode 100644 index 3cf5981c4be..00000000000 --- a/lib/cli/generators/RAX/template-csf/.storybook/manager.js +++ /dev/null @@ -1,14 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; - -import { create } from '@storybook/theming/create'; -import { addons } from '@storybook/addons'; - -const theme = create({ - base: 'light', - - brandTitle: 'Rax Kitchen Sink', - brandUrl: 'https://github.com/storybookjs/storybook/tree/master/examples/rax-kitchen-sink', -}); - -addons.setConfig({ theme }); diff --git a/lib/cli/generators/REACT/template-csf/.storybook/addons.js b/lib/cli/generators/REACT/template-csf/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/REACT/template-csf/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/REACT/template-csf/.storybook/config.js b/lib/cli/generators/REACT/template-csf/.storybook/config.js deleted file mode 100644 index 0603ed51131..00000000000 --- a/lib/cli/generators/REACT/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/react'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/REACT/template-csf/.storybook/main.js b/lib/cli/generators/REACT/template-csf/.storybook/main.js new file mode 100644 index 00000000000..448921317f4 --- /dev/null +++ b/lib/cli/generators/REACT/template-csf/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], +}; diff --git a/lib/cli/generators/REACT/template-mdx/.storybook/addons.js b/lib/cli/generators/REACT/template-mdx/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/REACT/template-mdx/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/REACT/template-mdx/.storybook/config.js b/lib/cli/generators/REACT/template-mdx/.storybook/config.js deleted file mode 100644 index e178df98fe4..00000000000 --- a/lib/cli/generators/REACT/template-mdx/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/react'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.(js|mdx)$/), module); diff --git a/lib/cli/generators/REACT/template-mdx/.storybook/main.js b/lib/cli/generators/REACT/template-mdx/.storybook/main.js new file mode 100644 index 00000000000..a54a6695456 --- /dev/null +++ b/lib/cli/generators/REACT/template-mdx/.storybook/main.js @@ -0,0 +1,10 @@ +module.exports = { + stories: ['../stories/**/*.stories.(js|mdx)'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], + presets: [ + { + name: '@storybook/addon-docs/preset', + options: { configureJSX: true }, + }, + ], +}; diff --git a/lib/cli/generators/REACT/template-mdx/.storybook/presets.js b/lib/cli/generators/REACT/template-mdx/.storybook/presets.js deleted file mode 100644 index 8c1b9d4e5ba..00000000000 --- a/lib/cli/generators/REACT/template-mdx/.storybook/presets.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = [ - { - name: '@storybook/addon-docs/preset', - options: { configureJSX: true }, - }, -]; diff --git a/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/addons.ts b/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/addons.ts deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/addons.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/config.ts b/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/config.ts deleted file mode 100644 index 0a0a64e2816..00000000000 --- a/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/config.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/react'; - -// automatically import all files ending in *.stories.(tsx|jsx) -configure(require.context('../src/stories', true, /\.stories\.[tj]sx?$/), module); diff --git a/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/main.js b/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/main.js new file mode 100644 index 00000000000..e7ecf26a2e1 --- /dev/null +++ b/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/main.js @@ -0,0 +1,5 @@ +module.exports = { + stories: ['../src/stories/**/*.stories.(ts|tsx|js|jsx)'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], + presets: ['@storybook/preset-create-react-app'], +}; diff --git a/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/presets.js b/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/presets.js deleted file mode 100644 index ccbce829866..00000000000 --- a/lib/cli/generators/REACT_SCRIPTS/template-csf-ts/.storybook/presets.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = ['@storybook/preset-create-react-app']; diff --git a/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/addons.js b/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/config.js b/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/config.js deleted file mode 100644 index 342071747f2..00000000000 --- a/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/react'; - -// automatically import all files ending in *.stories.js -configure(require.context('../src/stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/main.js b/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/main.js new file mode 100644 index 00000000000..42e0f55b0b7 --- /dev/null +++ b/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/main.js @@ -0,0 +1,5 @@ +module.exports = { + stories: ['../src/stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], + presets: ['@storybook/preset-create-react-app'], +}; diff --git a/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/presets.js b/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/presets.js deleted file mode 100644 index ccbce829866..00000000000 --- a/lib/cli/generators/REACT_SCRIPTS/template-csf/.storybook/presets.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = ['@storybook/preset-create-react-app']; diff --git a/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/addons.js b/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/config.js b/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/config.js deleted file mode 100644 index f3a1df13159..00000000000 --- a/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/react'; - -// automatically import all files ending in *.stories.js -configure(require.context('../src/stories', true, /\.stories\.(js|mdx)$/), module); diff --git a/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/main.js b/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/main.js new file mode 100644 index 00000000000..edbb63e2de4 --- /dev/null +++ b/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/main.js @@ -0,0 +1,13 @@ +module.exports = { + stories: ['../src/stories/**/*.stories.(js|mdx)'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], + presets: [ + '@storybook/preset-create-react-app', + { + name: '@storybook/addon-docs/preset', + options: { + configureJSX: true, + }, + }, + ], +}; diff --git a/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/presets.js b/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/presets.js deleted file mode 100644 index b92aeeb8fca..00000000000 --- a/lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/presets.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = [ - '@storybook/preset-create-react-app', - { - name: '@storybook/addon-docs/preset', - options: { - configureJSX: true, - }, - }, -]; diff --git a/lib/cli/generators/RIOT/template-csf/.storybook/addons.js b/lib/cli/generators/RIOT/template-csf/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/RIOT/template-csf/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/RIOT/template-csf/.storybook/config.js b/lib/cli/generators/RIOT/template-csf/.storybook/config.js deleted file mode 100644 index 99e7d848f2f..00000000000 --- a/lib/cli/generators/RIOT/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/riot'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/RIOT/template-csf/.storybook/main.js b/lib/cli/generators/RIOT/template-csf/.storybook/main.js new file mode 100644 index 00000000000..448921317f4 --- /dev/null +++ b/lib/cli/generators/RIOT/template-csf/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], +}; diff --git a/lib/cli/generators/SFC_VUE/template-csf/.storybook/addons.js b/lib/cli/generators/SFC_VUE/template-csf/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/SFC_VUE/template-csf/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/SFC_VUE/template-csf/.storybook/config.js b/lib/cli/generators/SFC_VUE/template-csf/.storybook/config.js deleted file mode 100644 index 145eb83c09a..00000000000 --- a/lib/cli/generators/SFC_VUE/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/vue'; - -// automatically import all files ending in *.stories.js -configure(require.context('../src/stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/SFC_VUE/template-csf/.storybook/main.js b/lib/cli/generators/SFC_VUE/template-csf/.storybook/main.js new file mode 100644 index 00000000000..6c7d25e7583 --- /dev/null +++ b/lib/cli/generators/SFC_VUE/template-csf/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../src/stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], +}; diff --git a/lib/cli/generators/SFC_VUE/template-mdx/.storybook/addons.js b/lib/cli/generators/SFC_VUE/template-mdx/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/SFC_VUE/template-mdx/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/SFC_VUE/template-mdx/.storybook/config.js b/lib/cli/generators/SFC_VUE/template-mdx/.storybook/config.js deleted file mode 100644 index 08a361c9a9b..00000000000 --- a/lib/cli/generators/SFC_VUE/template-mdx/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/vue'; - -// automatically import all files ending in *.stories.js -configure(require.context('../src/stories', true, /\.stories\.(js|mdx)$/), module); diff --git a/lib/cli/generators/SFC_VUE/template-mdx/.storybook/main.js b/lib/cli/generators/SFC_VUE/template-mdx/.storybook/main.js new file mode 100644 index 00000000000..2f8d2982005 --- /dev/null +++ b/lib/cli/generators/SFC_VUE/template-mdx/.storybook/main.js @@ -0,0 +1,5 @@ +module.exports = { + stories: ['../src/stories/**/*.stories.(js|mdx)'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], + presets: ['@storybook/addon-docs/preset'], +}; diff --git a/lib/cli/generators/SFC_VUE/template-mdx/.storybook/presets.js b/lib/cli/generators/SFC_VUE/template-mdx/.storybook/presets.js deleted file mode 100644 index a04174c7a33..00000000000 --- a/lib/cli/generators/SFC_VUE/template-mdx/.storybook/presets.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = ['@storybook/addon-docs/preset']; diff --git a/lib/cli/generators/SVELTE/template-csf/.storybook/addons.js b/lib/cli/generators/SVELTE/template-csf/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/SVELTE/template-csf/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/SVELTE/template-csf/.storybook/config.js b/lib/cli/generators/SVELTE/template-csf/.storybook/config.js deleted file mode 100644 index 1fdc85eecd1..00000000000 --- a/lib/cli/generators/SVELTE/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/svelte'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/SVELTE/template-csf/.storybook/main.js b/lib/cli/generators/SVELTE/template-csf/.storybook/main.js new file mode 100644 index 00000000000..448921317f4 --- /dev/null +++ b/lib/cli/generators/SVELTE/template-csf/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], +}; diff --git a/lib/cli/generators/VUE/template-csf/.storybook/addons.js b/lib/cli/generators/VUE/template-csf/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/VUE/template-csf/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/VUE/template-csf/.storybook/config.js b/lib/cli/generators/VUE/template-csf/.storybook/config.js deleted file mode 100644 index 1516685de79..00000000000 --- a/lib/cli/generators/VUE/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/vue'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/VUE/template-csf/.storybook/main.js b/lib/cli/generators/VUE/template-csf/.storybook/main.js new file mode 100644 index 00000000000..448921317f4 --- /dev/null +++ b/lib/cli/generators/VUE/template-csf/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], +}; diff --git a/lib/cli/generators/VUE/template-mdx/.storybook/addons.js b/lib/cli/generators/VUE/template-mdx/.storybook/addons.js deleted file mode 100644 index 6aed412d04a..00000000000 --- a/lib/cli/generators/VUE/template-mdx/.storybook/addons.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@storybook/addon-actions/register'; -import '@storybook/addon-links/register'; diff --git a/lib/cli/generators/VUE/template-mdx/.storybook/config.js b/lib/cli/generators/VUE/template-mdx/.storybook/config.js deleted file mode 100644 index f770a9332fd..00000000000 --- a/lib/cli/generators/VUE/template-mdx/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/vue'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.(js|mdx)$/), module); diff --git a/lib/cli/generators/VUE/template-mdx/.storybook/main.js b/lib/cli/generators/VUE/template-mdx/.storybook/main.js new file mode 100644 index 00000000000..78bc24049ae --- /dev/null +++ b/lib/cli/generators/VUE/template-mdx/.storybook/main.js @@ -0,0 +1,5 @@ +module.exports = { + stories: ['../stories/**/*.stories.(js|mdx)'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], + presets: ['@storybook/addon-docs/preset'], +}; diff --git a/lib/cli/generators/VUE/template-mdx/.storybook/presets.js b/lib/cli/generators/VUE/template-mdx/.storybook/presets.js deleted file mode 100644 index a04174c7a33..00000000000 --- a/lib/cli/generators/VUE/template-mdx/.storybook/presets.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = ['@storybook/addon-docs/preset']; diff --git a/lib/cli/generators/WEB-COMPONENTS/template/.storybook/config.js b/lib/cli/generators/WEB-COMPONENTS/template/.storybook/config.js deleted file mode 100644 index 055d4e30181..00000000000 --- a/lib/cli/generators/WEB-COMPONENTS/template/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/html'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/WEB-COMPONENTS/template/.storybook/main.js b/lib/cli/generators/WEB-COMPONENTS/template/.storybook/main.js new file mode 100644 index 00000000000..77857c48de3 --- /dev/null +++ b/lib/cli/generators/WEB-COMPONENTS/template/.storybook/main.js @@ -0,0 +1,3 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], +}; diff --git a/lib/cli/generators/WEBPACK_REACT/template-csf/.storybook/config.js b/lib/cli/generators/WEBPACK_REACT/template-csf/.storybook/config.js deleted file mode 100644 index 0603ed51131..00000000000 --- a/lib/cli/generators/WEBPACK_REACT/template-csf/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/react'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.js$/), module); diff --git a/lib/cli/generators/WEBPACK_REACT/template-csf/.storybook/main.js b/lib/cli/generators/WEBPACK_REACT/template-csf/.storybook/main.js new file mode 100644 index 00000000000..437d40a17c9 --- /dev/null +++ b/lib/cli/generators/WEBPACK_REACT/template-csf/.storybook/main.js @@ -0,0 +1,9 @@ +module.exports = { + stories: ['../stories/**/*.stories.js'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], + webpack: async config => { + // do mutation to the config + + return config; + }, +}; diff --git a/lib/cli/generators/WEBPACK_REACT/template-csf/.storybook/webpack.config.js b/lib/cli/generators/WEBPACK_REACT/template-csf/.storybook/webpack.config.js deleted file mode 100644 index e010e2f2b81..00000000000 --- a/lib/cli/generators/WEBPACK_REACT/template-csf/.storybook/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -// you can use this file to add your custom webpack plugins, loaders and anything you like. -// This is just the basic way to add additional webpack configurations. -// For more information refer the docs: https://storybook.js.org/configurations/custom-webpack-config - -// IMPORTANT -// When you add this file, we won't add the default configurations which is similar -// to "React Create App". This only has babel loader to load JavaScript. - -module.exports = { - plugins: [ - // your custom plugins - ], - module: { - rules: [ - // add your custom rules. - ], - }, -}; diff --git a/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/config.js b/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/config.js deleted file mode 100644 index e178df98fe4..00000000000 --- a/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/config.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from '@storybook/react'; - -// automatically import all files ending in *.stories.js -configure(require.context('../stories', true, /\.stories\.(js|mdx)$/), module); diff --git a/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/main.js b/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/main.js new file mode 100644 index 00000000000..936fe48e798 --- /dev/null +++ b/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/main.js @@ -0,0 +1,15 @@ +module.exports = { + stories: ['../stories/**/*.stories.(js|mdx)'], + addons: ['@storybook/addon-actions/register', '@storybook/addon-links/register'], + presets: [ + { + name: '@storybook/addon-docs/preset', + options: { configureJSX: true }, + }, + ], + webpack: async config => { + // do mutation to the config + + return config; + }, +}; diff --git a/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/presets.js b/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/presets.js deleted file mode 100644 index 8c1b9d4e5ba..00000000000 --- a/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/presets.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = [ - { - name: '@storybook/addon-docs/preset', - options: { configureJSX: true }, - }, -]; diff --git a/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/webpack.config.js b/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/webpack.config.js deleted file mode 100644 index e010e2f2b81..00000000000 --- a/lib/cli/generators/WEBPACK_REACT/template-mdx/.storybook/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -// you can use this file to add your custom webpack plugins, loaders and anything you like. -// This is just the basic way to add additional webpack configurations. -// For more information refer the docs: https://storybook.js.org/configurations/custom-webpack-config - -// IMPORTANT -// When you add this file, we won't add the default configurations which is similar -// to "React Create App". This only has babel loader to load JavaScript. - -module.exports = { - plugins: [ - // your custom plugins - ], - module: { - rules: [ - // add your custom rules. - ], - }, -};