Skip to content

Commit

Permalink
feat: build out dir
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 29, 2021
1 parent 80d0205 commit e858e9c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/slidev/node/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ cli.command(
default: false,
describe: 'build watch',
})
.option('out', {
alias: 'o',
type: 'string',
describe: 'output dir',
})
.option('base', {
type: 'string',
describe: 'output base',
Expand All @@ -113,7 +118,7 @@ cli.command(
describe: 'allow download as PDF',
})
.help(),
async({ entry, theme, watch, base, download }) => {
async({ entry, theme, watch, base, download, out }) => {
const { build } = await import('./build')

const options = await resolveOptions({ entry, theme }, 'build')
Expand All @@ -125,6 +130,7 @@ cli.command(
base,
build: {
watch: watch ? {} : undefined,
outDir: out,
},
})
},
Expand Down

0 comments on commit e858e9c

Please sign in to comment.