-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#227 Replaces vue-styleguidist with storybook
- Loading branch information
1 parent
a7643c7
commit 111831a
Showing
49 changed files
with
51,518 additions
and
41,183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ out | |
gen | ||
/node_modules/ | ||
/dist/ | ||
/dist-storybook/ | ||
/tests/unit/coverage/ | ||
|
||
# Visual Studio Code | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const webpackConfig = require('../webpack.config')(); | ||
|
||
module.exports = { | ||
stories: [ // @see https://storybook.js.org/docs/react/configure/overview#configure-story-loading | ||
'../src/**/*.stories.mdx', | ||
{ | ||
directory: '../src/stories/components/', | ||
titlePrefix: 'Components/', | ||
files: '*.stories.js', | ||
}, | ||
], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/preset-scss', | ||
], | ||
framework: '@storybook/vue3', | ||
core: { | ||
'builder': 'webpack5' | ||
}, | ||
|
||
webpackFinal: async (config) => { | ||
config.resolve.alias = { // Add alias from projects webpack config | ||
...config.resolve.alias, | ||
...webpackConfig.resolve.alias, | ||
}; | ||
|
||
return config; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { app } from '@storybook/vue3'; | ||
import vuePlugins from '../src/setup/plugins'; | ||
|
||
// @see https://storybook.js.org/docs/vue/writing-stories/decorators#context-for-mocking | ||
vuePlugins.forEach(([plugin, pluginOptions]) => { | ||
app.use(plugin, pluginOptions); | ||
}); | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.