-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b2de32
commit 6b5651c
Showing
4 changed files
with
22 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
'use strict' | ||
|
||
const rm = require('rimraf') | ||
const fs = require('fs') | ||
const log = require('./log') | ||
|
||
function clean (gyp, argv, callback) { | ||
async function clean (gyp, argv) { | ||
// Remove the 'build' dir | ||
const buildDir = 'build' | ||
|
||
log.verbose('clean', 'removing "%s" directory', buildDir) | ||
rm(buildDir, callback) | ||
await fs.promises.rm(buildDir, { recursive: true, force: true }) | ||
} | ||
|
||
module.exports = clean | ||
module.exports = function (gyp, argv, callback) { | ||
clean(gyp, argv).then(callback.bind(undefined, null), callback) | ||
} | ||
module.exports.usage = 'Removes any generated build files and the "out" dir' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters