Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcb54ae5

Browse files
committed
migrate storybook to use main.ts
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent276b695 commitcb54ae5

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(newMiniCssExtractPlugin({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)

[8]ページ先頭

©2009-2025 Movatter.jp