Skip to content

fix: converting stories #599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
migrate storybook to use main.ts
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
ShMcK committed Mar 24, 2022
commit cb54ae516546d35bb93d0a588db012ee404ce968
3 changes: 0 additions & 3 deletions web-app/.storybook/addons.ts

This file was deleted.

19 changes: 0 additions & 19 deletions web-app/.storybook/config.ts

This file was deleted.

19 changes: 19 additions & 0 deletions web-app/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// import '../src/styles/reset.css'

// setup acquireVsCodeApi mock
// @ts-ignore
global.acquireVsCodeApi = () => ({
postMessage(event) {
console.log('ERROR: VSCode did not load properly in CodeRoad extension', event)
},
})

module.exports = {
stories: ['../**/*.stories.js'],
addons: [
'@storybook/preset-create-react-app',
'@storybook/addon-actions',
'@storybook/addon-knobs',
'@storybook/addon-links',
],
}
8 changes: 7 additions & 1 deletion web-app/.storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ module.exports = ({ config }) => {
})

config.plugins.push(new MiniCssExtractPlugin({ filename: '[name].css' }))
// config.plugins.push(['import', { libraryName: '@alifd/next', libraryDirectory: 'lib', style: true }])
// config.plugins.push([
// 'babel-plugin-import',
// {
// libraryName: '@alifd/next',
// style: true,
// },
// ])

config.resolve.extensions.push('.ts', '.tsx')

Expand Down
10 changes: 5 additions & 5 deletions web-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
"devDependencies": {
"@babel/core": "7.14.0",
"@babel/helper-environment-visitor": "7.16.7",
"@storybook/addon-actions": "6.4.0",
"@storybook/addon-actions": "6.4.19",
"@storybook/addon-knobs": "6.4.0",
"@storybook/addon-links": "6.4.0",
"@storybook/addons": "6.4.0",
"@storybook/preset-create-react-app": "3.2.0",
"@storybook/react": "6.4.0",
"@storybook/addon-links": "6.4.19",
"@storybook/addons": "6.4.19",
"@storybook/preset-create-react-app": "4.1.0",
"@storybook/react": "6.4.19",
"@types/git-url-parse": "9.0.1",
"@types/graphql": "14.5.0",
"@types/highlight.js": "10.1.0",
Expand Down
Loading