mirror of
https://github.com/bower/bower.git
synced 2026-02-11 06:24:57 -05:00
Fix passing configuration into commands on programmatic usage, fixes #608.
This commit is contained in:
2
lib/commands/cache/clean.js
vendored
2
lib/commands/cache/clean.js
vendored
@@ -16,7 +16,7 @@ function clean(packages, options, config) {
|
||||
var names;
|
||||
|
||||
options = options || {};
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
|
||||
// If packages is an empty array, null them
|
||||
if (packages && !packages.length) {
|
||||
|
||||
2
lib/commands/cache/list.js
vendored
2
lib/commands/cache/list.js
vendored
@@ -10,7 +10,7 @@ function list(packages, options, config) {
|
||||
var emitter = new EventEmitter();
|
||||
var logger = new Logger();
|
||||
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
repository = new PackageRepository(config, logger);
|
||||
|
||||
// If packages is an empty array, null them
|
||||
|
||||
@@ -10,7 +10,7 @@ function info(pkg, property, config) {
|
||||
var emitter = new EventEmitter();
|
||||
var logger = new Logger();
|
||||
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
repository = new PackageRepository(config, logger);
|
||||
|
||||
pkg = pkg.split('#');
|
||||
|
||||
@@ -11,7 +11,7 @@ function install(endpoints, options, config) {
|
||||
var logger = new Logger();
|
||||
|
||||
options = options || {};
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
project = new Project(config, logger);
|
||||
|
||||
// If endpoints is an empty array, null them
|
||||
|
||||
@@ -16,7 +16,7 @@ function linkSelf(config) {
|
||||
var emitter = new EventEmitter();
|
||||
var logger = new Logger();
|
||||
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
project = new Project(config, logger);
|
||||
|
||||
project.getJson()
|
||||
@@ -49,7 +49,7 @@ function linkTo(name, localName, config) {
|
||||
var dst;
|
||||
var emitter = new EventEmitter();
|
||||
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
|
||||
localName = localName || name;
|
||||
src = path.join(config.storage.links, name);
|
||||
|
||||
@@ -16,7 +16,7 @@ function list(options, config) {
|
||||
var logger = new Logger();
|
||||
|
||||
options = options || {};
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
project = new Project(config, logger);
|
||||
repository = new PackageRepository(config, logger);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ function lookup(name, config) {
|
||||
var registryClient;
|
||||
var emitter = new EventEmitter();
|
||||
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
config.cache = config.storage.registry;
|
||||
|
||||
registryClient = new RegistryClient(config);
|
||||
|
||||
@@ -10,7 +10,7 @@ function prune(names, config) {
|
||||
var emitter = new EventEmitter();
|
||||
var logger = new Logger();
|
||||
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
project = new Project(config, logger);
|
||||
|
||||
// If names is an empty array, null them
|
||||
|
||||
@@ -16,7 +16,7 @@ function register(name, url, config) {
|
||||
var logger = new Logger();
|
||||
var force;
|
||||
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
force = config.force;
|
||||
|
||||
// Bypass any cache
|
||||
|
||||
@@ -10,7 +10,7 @@ function search(name, config) {
|
||||
var promise;
|
||||
var emitter = new EventEmitter();
|
||||
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
config.cache = config.storage.registry;
|
||||
|
||||
registryClient = new RegistryClient(config);
|
||||
|
||||
@@ -11,7 +11,7 @@ function uninstall(names, options, config) {
|
||||
var logger = new Logger();
|
||||
|
||||
options = options || {};
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
project = new Project(config, logger);
|
||||
|
||||
// If names is an empty array, null them
|
||||
|
||||
@@ -11,7 +11,7 @@ function update(names, options, config) {
|
||||
var logger = new Logger();
|
||||
|
||||
options = options || {};
|
||||
config = mout.object.deepMixIn(config || {}, defaultConfig);
|
||||
config = mout.object.deepFillIn(config || {}, defaultConfig);
|
||||
project = new Project(config, logger);
|
||||
|
||||
// If names is an empty array, null them
|
||||
|
||||
Reference in New Issue
Block a user