Skip to content

Commit cb54ae5

Browse files
committed
migrate storybook to use main.ts
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent 276b695 commit cb54ae5

File tree

6 files changed

+297
-307
lines changed

6 files changed

+297
-307
lines changed

web-app/.storybook/addons.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

web-app/.storybook/config.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

web-app/.storybook/main.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// import '../src/styles/reset.css'
2+
3+
// setup acquireVsCodeApi mock
4+
// @ts-ignore
5+
global.acquireVsCodeApi = () => ({
6+
postMessage(event) {
7+
console.log('ERROR: VSCode did not load properly in CodeRoad extension', event)
8+
},
9+
})
10+
11+
module.exports = {
12+
stories: ['../**/*.stories.js'],
13+
addons: [
14+
'@storybook/preset-create-react-app',
15+
'@storybook/addon-actions',
16+
'@storybook/addon-knobs',
17+
'@storybook/addon-links',
18+
],
19+
}

web-app/.storybook/webpack.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ module.exports = ({ config }) => {
1515
})
1616

1717
config.plugins.push(new MiniCssExtractPlugin({ filename: '[name].css' }))
18-
// config.plugins.push(['import', { libraryName: '@alifd/next', libraryDirectory: 'lib', style: true }])
18+
// config.plugins.push([
19+
// 'babel-plugin-import',
20+
// {
21+
// libraryName: '@alifd/next',
22+
// style: true,
23+
// },
24+
// ])
1925

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

web-app/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646
"devDependencies": {
4747
"@babel/core": "7.14.0",
4848
"@babel/helper-environment-visitor": "7.16.7",
49-
"@storybook/addon-actions": "6.4.0",
49+
"@storybook/addon-actions": "6.4.19",
5050
"@storybook/addon-knobs": "6.4.0",
51-
"@storybook/addon-links": "6.4.0",
52-
"@storybook/addons": "6.4.0",
53-
"@storybook/preset-create-react-app": "3.2.0",
54-
"@storybook/react": "6.4.0",
51+
"@storybook/addon-links": "6.4.19",
52+
"@storybook/addons": "6.4.19",
53+
"@storybook/preset-create-react-app": "4.1.0",
54+
"@storybook/react": "6.4.19",
5555
"@types/git-url-parse": "9.0.1",
5656
"@types/graphql": "14.5.0",
5757
"@types/highlight.js": "10.1.0",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy