Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

const rm = require('rimraf')
const log = require('npmlog')
const util = require('util')

function clean (gyp, argv, callback) {
async function clean (gyp, argv) {
// Remove the 'build' dir
var buildDir = 'build'
const buildDir = 'build'

log.verbose('clean', 'removing "%s" directory', buildDir)
rm(buildDir, callback)
return util.promisify(rm)(buildDir)
}

module.exports = clean
module.exports = function (gyp, argv, callback) {
// no response expected
clean(gyp, argv).then(() => callback(), callback)
}
module.exports.usage = 'Removes any generated build files and the "out" dir'