Skip to content

Commit

Permalink
Merge pull request #26213 from storybookjs/valentin/fix-running-story…
Browse files Browse the repository at this point in the history
…book-after-init-in-angular

Angular: Fix Storybook startup after init
  • Loading branch information
valentinpalkovic authored Feb 27, 2024
2 parents 02dbecf + 68c4590 commit 9ba16bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions code/lib/cli/src/generators/ANGULAR/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { join } from 'path';
import { paddedLog } from '@storybook/core-common';
import { commandLog } from '@storybook/core-common';
import { baseGenerator } from '../baseGenerator';
import type { Generator } from '../types';
import { CoreBuilder } from '../../project_types';
Expand Down Expand Up @@ -31,7 +31,7 @@ const generator: Generator<{ projectName: string }> = async (
}

const angularProjectName = await angularJSON.getProjectName();
paddedLog(`Adding Storybook support to your "${angularProjectName}" project`);
commandLog(`Adding Storybook support to your "${angularProjectName}" project`);

const angularProject = angularJSON.getProjectSettingsByName(angularProjectName);

Expand Down
3 changes: 2 additions & 1 deletion code/lib/cli/src/initiate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ export async function initiate(options: CommandOptions, pkg: PackageJson): Promi
const flags = [];

// npm needs extra -- to pass flags to the command
if (packageManager.type === 'npm') {
// in the case of Angular, we are calling `ng run` which doesn't need the extra `--`
if (packageManager.type === 'npm' && projectType !== ProjectType.ANGULAR) {
flags.push('--');
}

Expand Down

0 comments on commit 9ba16bf

Please sign in to comment.