mirror of
https://github.com/bower/bower.git
synced 2026-04-02 03:01:15 -04:00
Better doc.
This commit is contained in:
@@ -196,11 +196,13 @@ Project.prototype.update = function (names, options) {
|
||||
Project.prototype.uninstall = function (names, options) {
|
||||
var that = this;
|
||||
var deferred = Q.defer();
|
||||
var packages = {};
|
||||
|
||||
// Analyse the project
|
||||
this.analyse()
|
||||
// Fill in the packages to be uninstalled
|
||||
.spread(function (json, tree, flattened) {
|
||||
var promise = Q.resolve();
|
||||
var packages = [];
|
||||
|
||||
names.forEach(function (name) {
|
||||
var decEndpoint = flattened[name];
|
||||
@@ -272,13 +274,16 @@ Project.prototype.uninstall = function (names, options) {
|
||||
});
|
||||
});
|
||||
|
||||
return promise
|
||||
.then(function () {
|
||||
return that._removePackages(packages, options)
|
||||
.progress(deferred.notify);
|
||||
return promise;
|
||||
})
|
||||
// Remove packages
|
||||
.then(function () {
|
||||
return that._removePackages(packages, options)
|
||||
.progress(function (notification) {
|
||||
return notification;
|
||||
});
|
||||
})
|
||||
.then(deferred.resolve, deferred.reject);
|
||||
.then(deferred.resolve, deferred.reject, deferred.notify);
|
||||
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user