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");
|
2016-05-30 03:40:02 +00:00
|
|
|
plugins.beautylog.info("npmci 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;
|
2016-06-01 03:44:48 +00:00
|
|
|
case "prepare":
|
|
|
|
break;
|
2016-05-30 00:29:30 +00:00
|
|
|
case "publish":
|
2016-06-01 03:44:48 +00:00
|
|
|
npmci_publish_1.publish(commandOption);
|
2016-05-30 00:29:30 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2016-06-01 03:44:48 +00:00
|
|
|
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLElBQVksT0FBTyxXQUFNLGl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