Skip to content

Commit

Permalink
fix: remove --watch option in build command (#1598)
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed May 17, 2024
1 parent b2d1dac commit ad7da92
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion docs/guide/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ Build hostable SPA.

Options:

- `--watch`, `-w` (`boolean`, default: `false`): build watch.
- `--out`, `-o` (`string`, default: `dist`): output dir.
- `--base` (`string`, default: `/`): base URL (see https://cli.vuejs.org/config/#publicpath)
- `--download` (`boolean`, default: `false`): allow to download the slides as PDF inside the SPA.
Expand Down
8 changes: 1 addition & 7 deletions packages/slidev/node/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,6 @@ cli.command(
'build [entry..]',
'Build hostable SPA',
args => exportOptions(commonOptions(args))
.option('watch', {
alias: 'w',
default: false,
describe: 'build watch',
})
.option('out', {
alias: 'o',
type: 'string',
Expand All @@ -360,7 +355,7 @@ cli.command(
.strict()
.help(),
async (args) => {
const { entry, theme, watch, base, download, out, inspect } = args
const { entry, theme, base, download, out, inspect } = args
const { build } = await import('./commands/build')

for (const entryFile of entry as unknown as string[]) {
Expand All @@ -374,7 +369,6 @@ cli.command(
{
base,
build: {
watch: watch ? {} : undefined,
outDir: entry.length === 1 ? out : path.join(out, path.basename(entryFile, '.md')),
},
},
Expand Down
1 change: 0 additions & 1 deletion packages/types/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export interface ExportArgs extends CommonArgs {
}

export interface BuildArgs extends ExportArgs {
watch: boolean
out: string
base?: string
download?: boolean
Expand Down

0 comments on commit ad7da92

Please sign in to comment.