clean.js 378 B

12345678910111213141516171819202122
  1. module.exports = exports = clean
  2. exports.usage = 'Removes any generated build files and the "out" dir'
  3. /**
  4. * Module dependencies.
  5. */
  6. var rm = require('rimraf')
  7. var log = require('npmlog')
  8. function clean (gyp, argv, callback) {
  9. // Remove the 'build' dir
  10. var buildDir = 'build'
  11. log.verbose('clean', 'removing "%s" directory', buildDir)
  12. rm(buildDir, callback)
  13. }