Files
firebase-tools/commands/index.js
Michael Bleigh ffa918fbc8 Big refactors, fixes for bugs
* -s is now --non-interactive
* firebase-cli with options but no command no longer hangs
* login doesn't run in non-interactive mode
* config is now materialized according to the new world specs
* config and firebase name are applied in before filters
2015-10-12 10:42:25 -07:00

39 lines
1.2 KiB
JavaScript

'use strict';
module.exports = function(client) {
var loadCommand = function(name) {
var cmd = require('./' + name);
cmd.register(client);
return cmd.runner();
};
// client.collab = loadCommand('collab');
// client.collab.invite = loadCommand('collab-invite');
// client.collab.remove = loadCommand('collab-remove');
client.data = {
get: loadCommand('data-get'),
push: loadCommand('data-push'),
set: loadCommand('data-set'),
remove: loadCommand('data-remove'),
update: loadCommand('data-update')
};
// client.deploy = loadCommand('deploy');
// client.deploy.hosting = loadCommand('deploy-hosting');
// client.deploy.rules = loadCommand('deploy-rules');
// client.disable = {
// hosting: loadCommand('disable-hosting')
// };
client.help = loadCommand('help');
client.init = loadCommand('init');
client.list = loadCommand('list');
client.login = loadCommand('login');
client.logout = loadCommand('logout');
client.open = loadCommand('open');
client.prefs = {};
// client.prefs = loadCommand('prefs');
client.prefs.token = loadCommand('prefs-token');
client.serve = loadCommand('serve');
return client;
};