Skip to content

Commit

Permalink
feat: support --no-clean for dev command (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
PopperLi committed Oct 20, 2023
1 parent b13bc23 commit 00e591b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/normal/package.json
Expand Up @@ -3,6 +3,7 @@
"build": "father build",
"build:no-clean": "father build --no-clean",
"dev": "father dev",
"dev:no-clean": "father dev --no-clean",
"doctor": "father doctor",
"version": "father version"
},
Expand Down
6 changes: 5 additions & 1 deletion src/commands/dev.ts
Expand Up @@ -7,12 +7,16 @@ export default (api: IApi) => {
api.registerCommand({
name: DEV_COMMAND,
description: 'start incremental build in watch mode',
async fn() {
options: `
--no-clean do not clean all output directories before dev
`,
async fn({ args }) {
const buildWatcher = await builder({
userConfig: api.config,
cwd: api.cwd,
pkg: api.pkg,
watch: true,
clean: args.clean,
});

// handle config change
Expand Down

0 comments on commit 00e591b

Please sign in to comment.