Fix script

This commit is contained in:
Tom Coleman 2022-09-16 14:29:25 +10:00
parent f868d66f03
commit d9d6b4aed1

View File

@ -186,10 +186,10 @@ async function updatePackageScripts({ cwd, prefix }: { cwd: string; prefix: stri
const packageJson = await readJSON(packageJsonPath);
packageJson.scripts = {
...packageJson.scripts,
storybook: packageJson.scripts.storybook.replace(/(npx )?storybook/, `${prefix} $&`),
storybook: packageJson.scripts.storybook.replace(/(npx )?storybook/, `${prefix} storybook`),
'build-storybook': packageJson.scripts['build-storybook'].replace(
/(npx )?storybook/,
`${prefix} $&`
`${prefix} storybook`
),
};
await writeJSON(packageJsonPath, packageJson, { spaces: 2 });