mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 21:51:17 +08:00
Fix previous
This commit is contained in:
parent
a937b03e09
commit
f868d66f03
@ -186,8 +186,11 @@ async function updatePackageScripts({ cwd, prefix }: { cwd: string; prefix: stri
|
||||
const packageJson = await readJSON(packageJsonPath);
|
||||
packageJson.scripts = {
|
||||
...packageJson.scripts,
|
||||
storybook: packageJson.scripts.storybook.replace(/(npx )?sb/, `${prefix} $&`),
|
||||
'build-storybook': packageJson.scripts['build-storybook'].replace(/(npx )?sb/, `${prefix} $&`),
|
||||
storybook: packageJson.scripts.storybook.replace(/(npx )?storybook/, `${prefix} $&`),
|
||||
'build-storybook': packageJson.scripts['build-storybook'].replace(
|
||||
/(npx )?storybook/,
|
||||
`${prefix} $&`
|
||||
),
|
||||
};
|
||||
await writeJSON(packageJsonPath, packageJson, { spaces: 2 });
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user