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

* feat!: update `engines.node` to `^14.17.0 || ^16.13.0 || >=18.0.0` * deps: nopt@^7.0.0 * feat: replace npmlog with proc-log * deps: standard@17.0.0 and fix linting errors * deps: which@3.0.0 - this also promiisifies the build command * deps: glob@8.0.3 * feat: drop rimraf dependency * fix: use fs/promises in favor of fs.promises
17 lines
485 B
JavaScript
17 lines
485 B
JavaScript
'use strict'
|
|
|
|
const fs = require('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 = 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'
|