mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
Run the a11y automigration on postInstall
This commit is contained in:
parent
d6a06fbf52
commit
11628b25e8
@ -38,7 +38,8 @@
|
||||
},
|
||||
"./manager": "./dist/manager.js",
|
||||
"./register": "./dist/manager.js",
|
||||
"./package.json": "./package.json"
|
||||
"./package.json": "./package.json",
|
||||
"./postinstall": "./dist/postinstall.js"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
@ -87,6 +88,9 @@
|
||||
],
|
||||
"previewEntries": [
|
||||
"./src/preview.tsx"
|
||||
],
|
||||
"nodeEntries": [
|
||||
"./src/postinstall.ts"
|
||||
]
|
||||
},
|
||||
"gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae16",
|
||||
|
14
code/addons/a11y/src/postinstall.ts
Normal file
14
code/addons/a11y/src/postinstall.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { JsPackageManagerFactory } from 'storybook/internal/common';
|
||||
|
||||
import { type PostinstallOptions } from '../../../lib/cli-storybook/src/add';
|
||||
|
||||
export default async function postInstall(options: PostinstallOptions) {
|
||||
const packageManager = JsPackageManagerFactory.getPackageManager({
|
||||
force: options.packageManager,
|
||||
});
|
||||
|
||||
await packageManager.executeCommand({
|
||||
command: 'npx',
|
||||
args: ['storybook', 'automigrate', 'addonA11yAddonTest'],
|
||||
});
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user