Skip to content

Commit fe60d04

Browse files
committed
[FEATURE] ui5 build: Add --clean-dest option
This exposes the UI5 Builders cleanDest parameter that was added with SAP/ui5-builder#306. Usage: ui5 build --clean-dest Description: If present, clean the destination directory before building Default: false Resolves https://github.com/SAP/ui5-builder/issues/45 Resolves SAP/ui5-tooling#182
1 parent 8673c00 commit fe60d04

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/cli/commands/build.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ build.builder = function(cli) {
4242
default: "./dist",
4343
type: "string"
4444
})
45+
.option("clean-dest", {
46+
describe: "If present, clean the destination directory before building",
47+
default: false,
48+
type: "boolean"
49+
})
4550
.option("dev-exclude-project", {
4651
describe: "A list of specific projects to be excluded from dev mode (dev mode must be active for this to be effective)",
4752
type: "array"
@@ -80,6 +85,7 @@ function handleBuild(argv) {
8085
return builder.build({
8186
tree: tree,
8287
destPath: argv.dest,
88+
cleanDest: argv["clean-dest"],
8389
buildDependencies: argv.all,
8490
dev: command === "dev",
8591
selfContained: command === "self-contained",

test/lib/cli/commands/build.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const defaultBuilderArgs = {
2222
},
2323
destPath: "./dist",
2424
buildDependencies: undefined,
25+
cleanDest: undefined,
2526
dev: false,
2627
selfContained: false,
2728
jsdoc: false,

0 commit comments

Comments
 (0)