Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
Remove npm as a dependency
Browse files Browse the repository at this point in the history
- not really needed
  • Loading branch information
Chris Kleeschulte committed Sep 19, 2016
1 parent 639fdc9 commit 6231249
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
20 changes: 1 addition & 19 deletions lib/scaffold/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var async = require('async');
var fs = require('fs');
var npm = require('npm');
var path = require('path');
var spawn = require('child_process').spawn;
var bitcore = require('bitcore-lib');
Expand Down Expand Up @@ -79,24 +78,7 @@ function uninstallService(configDir, service, done) {
function removeService(configDir, service, done) {
$.checkArgument(utils.isAbsolutePath(configDir), 'An absolute path is expected');
$.checkArgument(_.isString(service), 'A string is expected for the service argument');

// check if the service is installed
npm.load(function(err) {
if (err) {
return done(err);
}
npm.commands.ls([service], true /*silent*/, function(err, data, lite) {
if (err) {
return done(err);
}
if (lite.dependencies) {
uninstallService(configDir, service, done);
} else {
done();
}
});
});

uninstallService(configDir, service, done);
}

/**
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"liftoff": "^2.2.0",
"lru-cache": "^4.0.1",
"mkdirp": "0.5.0",
"npm": "^2.14.1",
"path-is-absolute": "^1.0.0",
"semver": "^5.0.1",
"socket.io": "^1.4.5",
Expand Down

0 comments on commit 6231249

Please sign in to comment.