mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00

BREAKING CHANGE: All internal functions have been coverted to return promises and no longer accept callbacks. This is not a breaking change for users but may be breaking to consumers of `node-gyp` if you are requiring internal functions directly.
15 lines
399 B
JavaScript
15 lines
399 B
JavaScript
'use strict'
|
|
|
|
const fs = require('graceful-fs').promises
|
|
const log = require('./log')
|
|
|
|
async function clean (gyp, argv) {
|
|
// Remove the 'build' dir
|
|
const buildDir = 'build'
|
|
|
|
log.verbose('clean', 'removing "%s" directory', buildDir)
|
|
await fs.rm(buildDir, { recursive: true, force: true })
|
|
}
|
|
|
|
module.exports = clean
|
|
module.exports.usage = 'Removes any generated build files and the "out" dir'
|