aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/node-gyp/lib/clean.js
blob: 479c374f10fa2e519aef630607886978b7bc62e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'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, maxRetries: 3 })
}

module.exports = clean
module.exports.usage = 'Removes any generated build files and the "out" dir'