Skip to content

Commit

Permalink
Add story and fix chalk output
Browse files Browse the repository at this point in the history
  • Loading branch information
codykaup committed Oct 23, 2024
1 parent 1f5a729 commit 11207e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions node-src/ui/messages/errors/buildFailed.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,15 @@ export const BuildFailed = () =>
{ message: 'Command failed with exit code 1' },
buildLog
);

export const BuildFailedWithCommand = () =>
buildFailed(
{
options: { buildCommand: 'nx run my-app:build-storybook' },
buildCommand,
buildLogFile: '/path/to/project/build-storybook.log',
runtimeMetadata,
} as any,
{ message: 'Command failed with exit code 1' },
buildLog
);
4 changes: 2 additions & 2 deletions node-src/ui/messages/errors/buildFailed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default (

const commandToBuild = buildScriptName || buildCommandOption;
const suggestedRunCommands = buildScriptName
? `{bold npm run ${commandToBuild}} or {bold yarn ${commandToBuild}}`
: `{bold ${commandToBuild}}`;
? chalk`{bold npm run ${commandToBuild}} or {bold yarn ${commandToBuild}}`
: chalk`{bold ${commandToBuild}}`;

return [
dedent(chalk`
Expand Down

0 comments on commit 11207e9

Please sign in to comment.