Skip to content

Commit

Permalink
add rw storybook --ci option passing --smoke-test
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidprice authored and virtuoushub committed Nov 26, 2021
1 parent 1732559 commit cb1eb7c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/cli/src/commands/storybook.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ export const builder = (yargs) => {
type: 'string',
default: 'public/storybook',
})
.option('ci', {
describe:
"CI mode plus Smoke-test (skip prompts, don't open browser, exit after successful start)",
type: 'boolean',
default: false,
})
}

export const handler = ({ open, port, build, buildDirectory }) => {
export const handler = ({ open, port, build, buildDirectory, ci }) => {
const cwd = getPaths().web.base

const staticAssetsFolder = path.join(getPaths().web.base, 'public')
Expand All @@ -59,6 +65,7 @@ export const handler = ({ open, port, build, buildDirectory }) => {
build &&
`--output-dir "${path.join(getPaths().web.base, buildDirectory)}"`,
!open && '--ci',
ci && '--ci --smoke-test',
].filter(Boolean),
{
stdio: 'inherit',
Expand Down

0 comments on commit cb1eb7c

Please sign in to comment.