2dda2e10
Administrator
generator ignore
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
var Project = require('../core/Project');
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.readOptions = function (argv) {
var cli = require('../util/cli');
var options = cli.readOptions({
'force-latest': { type: Boolean, shorthand: 'F' },
'production': { type: Boolean, shorthand: 'p' }
}, argv);
var names = options.argv.remain.slice(1);
delete options.argv;
return [names, options];
};
module.exports = update;
|