Skip to content

Commit

Permalink
feat(cli): Support chromatic's --webpack-stats-json flag (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
valernyx authored Feb 21, 2022
1 parent c349518 commit 56c8eef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/content/1.getting-started/3.commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Development command have some options you can pass to alter storybook behaviors.
--smoke-test Exit after successful start
--ci CI mode (skip interactive prompts, don't open browser)
--quiet Suppress verbose build output
--tsconfig <file-path> Specify tha path to tsconfig.json file.
--tsconfig <file-path> Specify the path to tsconfig.json file.
```

## Export
Expand Down Expand Up @@ -64,6 +64,8 @@ Build command have some options you can pass to alter storybook behaviors.
-o, --output-dir [dir-name] Directory where to store built files
--tsconfig <file-path> Specify tha path to tsconfig.json file.
--quiet
--webpack-stats-json <file-path> Must be set to the value of --output-dir, for
use with Chromatic's TurboSnap feature
```

## Eject
Expand Down
3 changes: 2 additions & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ function _run () {
'-h': '--host',
'--force': Boolean,
'--tsconfig': String,
'--no-manager-cache': Boolean
'--no-manager-cache': Boolean,
'--webpack-stats-json': String
})
const { _, ...flags } = args

Expand Down
1 change: 1 addition & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ export interface StorybookOptions {
port?: Number;
host?: String;
force?: boolean;
webpackStatsJson?: string;
}

0 comments on commit 56c8eef

Please # to comment.