Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean output directories when building less than
all
(#3972)
Previously only the `all` target (`npx grunt all`) would clean the output directories, potentially leaving old files behind when using the `standalone`, `wpt`, or `node` targets. This splits up the `clean` command and invokes each one exactly when necessary so that old files aren't left behind. Tested with: ``` mkdir -p {gen,out,out-node,out-wpt}/BAD npx grunt generate-common # leaves only {out,out-node,out-wpt}/BAD mkdir -p {gen,out,out-node,out-wpt}/BAD npx grunt standalone # leaves only {out-node,out-wpt}/BAD mkdir -p {gen,out,out-node,out-wpt}/BAD npx grunt wpt # leaves only {out,out-node}/BAD mkdir -p {gen,out,out-node,out-wpt}/BAD npx grunt node # leaves only {out,out-wpt}/BAD mkdir -p {gen,out,out-node,out-wpt}/BAD npx grunt clean # cleans all 4, leaves no BADs ``` Fixes 3834
- Loading branch information