From a35dd089b22ae5750cecac8f817d116dae0cc6af Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 21 Jan 2026 11:25:57 +0100 Subject: [PATCH 1/2] Refactor port handling and onboarding logic in runStorybookDev function --- code/lib/create-storybook/src/initiate.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/lib/create-storybook/src/initiate.ts b/code/lib/create-storybook/src/initiate.ts index c94160f0d65d..68dc09039b72 100644 --- a/code/lib/create-storybook/src/initiate.ts +++ b/code/lib/create-storybook/src/initiate.ts @@ -201,13 +201,13 @@ async function runStorybookDev(result: { if (useAlternativePort) { parts.push(`-p`, `${availablePort}`); + } - if (supportsOnboarding && shouldOnboard) { - parts.push('--initial-path=/onboarding'); - } - - parts.push('--quiet'); + if (supportsOnboarding && shouldOnboard) { + parts.push('--initial-path=/onboarding'); } + + parts.push('--quiet'); } // instead of calling 'dev' automatically, we spawn a subprocess so that it gets From 26dfe514ef17c966ce88d7b6fe1711b12c9ae63f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 21 Jan 2026 11:28:49 +0100 Subject: [PATCH 2/2] Update comments in runStorybookDev function to clarify Angular flag handling --- code/lib/create-storybook/src/initiate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/create-storybook/src/initiate.ts b/code/lib/create-storybook/src/initiate.ts index 68dc09039b72..96759086aa20 100644 --- a/code/lib/create-storybook/src/initiate.ts +++ b/code/lib/create-storybook/src/initiate.ts @@ -182,11 +182,11 @@ async function runStorybookDev(result: { parts.push('--silent'); } + // in the case of Angular, we are calling `ng run` which doesn't allow passing flags to the command const supportSbFlags = projectType !== ProjectType.ANGULAR; if (supportSbFlags) { // npm needs extra -- to pass flags to the command - // in the case of Angular, we are calling `ng run` which doesn't need the extra `--` const doesNeedExtraDash = packageManager.type === PackageManagerName.NPM || packageManager.type === PackageManagerName.BUN;