Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/node-gyp/lib/clean.js')
-rw-r--r--node_modules/node-gyp/lib/clean.js27
1 files changed, 3 insertions, 24 deletions
diff --git a/node_modules/node-gyp/lib/clean.js b/node_modules/node-gyp/lib/clean.js
index a8efc1bd7..1e5611451 100644
--- a/node_modules/node-gyp/lib/clean.js
+++ b/node_modules/node-gyp/lib/clean.js
@@ -8,35 +8,14 @@ exports.usage = 'Removes any generated build files and the "out" dir'
*/
var rm = require('rimraf')
- , asyncEmit = require('./util/asyncEmit')
- , createHook = require('./util/hook')
function clean (gyp, argv, callback) {
// Remove the 'build' dir
var buildDir = 'build'
- , emitter
-
- createHook('gyp-clean.js', function (err, _e) {
- if (err) return callback(err)
- emitter = _e
- asyncEmit(emitter, 'before', function (err) {
- if (err) return callback(err)
- doClean()
- })
- })
-
- function doClean () {
- gyp.verbose('removing "build" directory')
- rm(buildDir, after)
- }
-
- function after () {
- asyncEmit(emitter, 'after', function (err) {
- if (err) return callback(err)
- callback()
- })
- }
+
+ gyp.verbose('removing "build" directory')
+ rm(buildDir, callback)
}