Skip to content

Commit

Permalink
Merge pull request #19909 from storybookjs/fix/check-and-build-scripts
Browse files Browse the repository at this point in the history
Maintenance: fix execa usage in build and check scripts
  • Loading branch information
yannbf authored Nov 21, 2022
2 parents bd01d58 + a27608e commit b102c39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/build-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ async function run() {
selection?.filter(Boolean).forEach(async (v) => {
const commmand = (await readJSON(resolve(v.location, 'package.json'))).scripts.prep;
const cwd = resolve(__dirname, '..', 'code', v.location);
const sub = await import('execa').execaCommand(
const { execaCommand } = await import('execa');
const sub = execaCommand(
`${commmand}${watchMode ? ' --watch' : ''}${prodMode ? ' --optimized' : ''}`,
{
cwd,
Expand Down
3 changes: 2 additions & 1 deletion scripts/check-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ async function run() {
selection?.filter(Boolean).forEach(async (v) => {
const commmand = (await readJSON(resolve(v.location, 'package.json'))).scripts.check;
const cwd = resolve(__dirname, '..', 'code', v.location);
const sub = await import('execa').execaCommand(`${commmand}${watchMode ? ' --watch' : ''}`, {
const { execaCommand } = await import('execa');
const sub = execaCommand(`${commmand}${watchMode ? ' --watch' : ''}`, {
cwd,
buffer: false,
shell: true,
Expand Down

0 comments on commit b102c39

Please sign in to comment.