Sha256: bbb5a305b1e59d173179519ae4894df9a366925accc2649afb8ca75912b4c636

Contents?: true

Size: 920 Bytes

Versions: 7

Compression:

Stored size: 920 Bytes

Contents

var Project = require('../core/Project');
var cli = require('../util/cli');
var defaultConfig = require('../config');

function update(logger, names, options, config) {
    var project;

    options = options || {};
    config = defaultConfig(config);
    project = new Project(config, logger);

    // If names is an empty array, null them
    if (names && !names.length) {
        names = null;
    }

    return project.update(names, options);
}

// -------------------

update.line = function (logger, argv) {
    var options = update.options(argv);
    var names = options.argv.remain.slice(1);
    return update(logger, names, options);
};

update.options = function (argv) {
    return cli.readOptions({
        'force-latest': { type: Boolean, shorthand: 'F' },
        'production': { type: Boolean, shorthand: 'p' }
    }, argv);
};

update.completion = function () {
    // TODO:
};

module.exports = update;

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
entangled-0.0.16 spec/dummy/public/node_modules/bower/lib/commands/update.js
entangled-0.0.15 spec/dummy/public/node_modules/bower/lib/commands/update.js
entangled-0.0.14 spec/dummy/public/node_modules/bower/lib/commands/update.js
entangled-0.0.13 spec/dummy/public/node_modules/bower/lib/commands/update.js
entangled-0.0.12 spec/dummy/public/node_modules/bower/lib/commands/update.js
entangled-0.0.11 spec/dummy/public/node_modules/bower/lib/commands/update.js
entangled-0.0.10 spec/dummy/public/node_modules/bower/lib/commands/update.js