mirror of
https://github.com/bower/bower.git
synced 2026-02-12 06:55:04 -05:00
Restore also extraneous so they are accounted in the uninstall command.
This commit is contained in:
@@ -242,7 +242,7 @@ Project.prototype.uninstall = function (names, options) {
|
||||
// Otherwise we need to figure it out if the user really wants to remove it,
|
||||
// even with dependants
|
||||
} else {
|
||||
message = dependants.map(function (dep) { return dep.name; }).join(', ') + ' depend on ' + decEndpoint.name;
|
||||
message = dependants.map(function (dep) { return dep.name; }).join(', ') + ' depends on ' + decEndpoint.name;
|
||||
data = {
|
||||
package: decEndpoint.name,
|
||||
dependants: dependants.map(function (decEndpoint) {
|
||||
@@ -324,8 +324,15 @@ Project.prototype.analyse = function () {
|
||||
mout.object.forOwn(flattened, function (decEndpoint) {
|
||||
if (!decEndpoint.dependants) {
|
||||
decEndpoint.extraneous = true;
|
||||
|
||||
// Restore them
|
||||
this._restoreNode(decEndpoint, flattened);
|
||||
// Do the same for the dev dependencies
|
||||
if (!this._production) {
|
||||
this._restoreNode(decEndpoint, flattened, 'devDependencies');
|
||||
}
|
||||
}
|
||||
});
|
||||
}, this);
|
||||
|
||||
return [json, root, flattened];
|
||||
}.bind(this));
|
||||
|
||||
Reference in New Issue
Block a user