2016-05-30 00:29:30 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
"use strict";
|
|
|
|
require("typings-global");
|
|
|
|
var plugins = require("./npmci.plugins");
|
2016-05-30 01:19:07 +00:00
|
|
|
var packJson = require("../package.json");
|
|
|
|
plugins.beautylog.log("npmci in version" + packJson.version);
|
2016-05-30 00:29:30 +00:00
|
|
|
var npmci_install_1 = require("./npmci.install");
|
|
|
|
var npmci_test_1 = require("./npmci.test");
|
|
|
|
var npmci_publish_1 = require("./npmci.publish");
|
|
|
|
var command;
|
|
|
|
var commandOption;
|
|
|
|
plugins.commander
|
|
|
|
.arguments('<commandarg> [commandoptionarg]')
|
|
|
|
.action(function (commandarg, commandoptionarg) {
|
|
|
|
command = commandarg;
|
|
|
|
commandOption = commandoptionarg;
|
|
|
|
});
|
|
|
|
plugins.commander.parse(process.argv);
|
|
|
|
if (typeof command === 'undefined') {
|
|
|
|
console.error('no command given!');
|
|
|
|
process.exit(1);
|
|
|
|
}
|
|
|
|
switch (command) {
|
|
|
|
case "install":
|
|
|
|
npmci_install_1.install(commandOption);
|
|
|
|
break;
|
|
|
|
case "test":
|
|
|
|
npmci_test_1.test(commandOption);
|
|
|
|
break;
|
|
|
|
case "publish":
|
|
|
|
npmci_publish_1.publish();
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2016-05-30 01:19:07 +00:00
|
|
|
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLElBQVksT0FBTyxXQUFNLGlCQUFpQixDQUFDLENBQUE7QUFFM0MsSUFBSSxRQUFRLEdBQUcsT0FBTyxDQUFDLGlCQUFpQixDQUFDLENBQUM7QUFFMUMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxHQUF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