mirror of
https://github.com/bower/bower.git
synced 2026-02-03 10:34:59 -05:00
Move --force tests from the package to the manager.
This commit is contained in:
@@ -34,21 +34,12 @@ var readJSON = require('../util/read-json');
|
||||
var UnitWork = require('./unit_work');
|
||||
|
||||
var Package = function (name, endpoint, manager) {
|
||||
this.dependencies = {};
|
||||
this.json = {};
|
||||
this.name = name;
|
||||
|
||||
// The third argument can be a manager or an options object
|
||||
// If its a manager, the opts & unit of work are grabbed from it
|
||||
// We can't use the instanceof because of a circular reference between the two packages
|
||||
if (manager && manager.unitWork) {
|
||||
this.manager = manager;
|
||||
this.unitWork = manager.unitWork;
|
||||
this.opts = manager.opts;
|
||||
} else {
|
||||
this.unitWork = new UnitWork;
|
||||
this.opts = _.extend({ force: false }, manager);
|
||||
}
|
||||
this.dependencies = {};
|
||||
this.json = {};
|
||||
this.name = name;
|
||||
this.manager = manager;
|
||||
this.unitWork = manager ? manager.unitWork : new UnitWork;
|
||||
this.opts = manager ? manager.opts : {};
|
||||
|
||||
if (endpoint) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user