mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Tweaks.
This commit is contained in:
@@ -13,6 +13,7 @@ var options;
|
||||
var renderer;
|
||||
var loglevel;
|
||||
var command;
|
||||
var emitter;
|
||||
var notifier;
|
||||
var levels = {
|
||||
'error': 5,
|
||||
@@ -56,11 +57,11 @@ if (!commands[command]) {
|
||||
}
|
||||
|
||||
// Execute the command
|
||||
command = commands[command].line(process.argv);
|
||||
emitter = commands[command].line(process.argv);
|
||||
|
||||
// Connect the command output to the renderer
|
||||
renderer = cli.getRenderer(command.name, config);
|
||||
command
|
||||
renderer = cli.getRenderer(emitter.command, config);
|
||||
emitter
|
||||
.on('end', function (data) {
|
||||
if (!config.silent) {
|
||||
renderer.end(data);
|
||||
|
||||
@@ -15,7 +15,7 @@ function help(name) {
|
||||
emitter.emit('end', json);
|
||||
});
|
||||
|
||||
emitter.name = 'help';
|
||||
emitter.command = 'help';
|
||||
|
||||
return emitter;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ function install(endpoints, options, config) {
|
||||
emitter.emit('notification', notification);
|
||||
});
|
||||
|
||||
emitter.name = 'install';
|
||||
emitter.command = 'install';
|
||||
|
||||
return emitter;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ function uninstall(endpoints, options, config) {
|
||||
emitter.emit('notification', notification);
|
||||
});
|
||||
|
||||
emitter.name = 'uninstall';
|
||||
emitter.command = 'uninstall';
|
||||
|
||||
return emitter;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ function update(endpoints, options, config) {
|
||||
emitter.emit('notification', notification);
|
||||
});
|
||||
|
||||
emitter.name = 'update';
|
||||
emitter.command = 'update';
|
||||
|
||||
return emitter;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,11 @@ StandardRenderer.prototype.updateNotice = function (data) {
|
||||
// -------------------------
|
||||
|
||||
StandardRenderer.prototype._install = function (installed) {
|
||||
// TODO
|
||||
// TODO: render tree of installed packages
|
||||
};
|
||||
|
||||
StandardRenderer.prototype._update = function (updated) {
|
||||
// TODO: render tree of updated packages
|
||||
};
|
||||
|
||||
StandardRenderer.prototype._help = function (data) {
|
||||
@@ -93,7 +97,7 @@ StandardRenderer.prototype._help = function (data) {
|
||||
.then(function (str) {
|
||||
that._write(process.stdout, str);
|
||||
}, function (err) {
|
||||
// If it failed with something else than ENOENTm
|
||||
// If it failed with something else than ENOENT
|
||||
// error out
|
||||
if (err.code !== 'ENOENT') {
|
||||
return err;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{
|
||||
"shorthand": "-j",
|
||||
"flag": "--json",
|
||||
"description": "Output consumable JSON output"
|
||||
"description": "Output consumable JSON"
|
||||
},
|
||||
{
|
||||
"shorthand": "-l",
|
||||
|
||||
Reference in New Issue
Block a user