Merge pull request #18817 from storybookjs/fix/yarn-build-command

fix yarn build command
This commit is contained in:
Yann Braga 2022-07-29 17:51:15 +02:00 committed by GitHub
commit 3151f378c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ const { resolve } = require('path');
const { readJSON } = require('fs-extra');
const getStorybookPackages = async () => {
const workspaceJSON = await readJSON(resolve(__dirname, '..', 'workspace.json'));
const workspaceJSON = await readJSON(resolve(__dirname, '..', 'code', 'workspace.json'));
return Object.entries(workspaceJSON.projects).map(([k, v]) => ({
location: v.root,
name: k,
@ -114,7 +114,7 @@ async function run() {
selection?.filter(Boolean).forEach(async (v) => {
const commmand = (await readJSON(resolve(v.location, 'package.json'))).scripts.prepare;
const cwd = resolve(__dirname, '..', v.location);
const cwd = resolve(__dirname, '..', 'code', v.location);
const sub = require('execa').command(
`yarn ${commmand}${watchMode ? ' --watch' : ''}${prodMode ? ' --optimized' : ''}`,
{