npmci/dist/index.js

37 lines
3.4 KiB
JavaScript
Raw Permalink Normal View History

2016-05-30 00:29:30 +00:00
#!/usr/bin/env node
"use strict";
require("typings-global");
var plugins = require("./npmci.plugins");
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
.version('0.0.1')
.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;
}
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLElBQVksT0FBTyxXQUFNLGlCQUFpQixDQUFDLENBQUE7QUFFM0MsOEJBQXNCLGlCQUFpQixDQUFDLENBQUE7QUFDeEMsMkJBQW1CLGNBQWMsQ0FBQyxDQUFBO0FBQ2xDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBR3hDLElBQUksT0FBTyxDQUFDO0FBQ1osSUFBSSxhQUFhLENBQUM7QUFFbEIsT0FBTyxDQUFDLFNBQVM7S0FDWixPQUFPLENBQUMsT0FBTyxDQUFDO0tBQ2hCLFNBQVMsQ0FBQyxpQ0FBaUMsQ0FBQztLQUM1QyxNQUFNLENBQUMsVUFBVSxVQUFVLEVBQUUsZ0JBQWdCO0lBQzFDLE9BQU8sR0FBRyxVQUFVLENBQUM7SUFDckIsYUFBYSxHQUFHLGdCQUFnQixDQUFDO0FBQ3JDLENBQUMsQ0FBQyxDQUFDO0FBRVAsT0FBTyxDQUF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tYW5kZXJcclxuICAgIC52ZXJzaW9uKCcwLjAuMScpXHJcbiAgICAuYXJndW1lbnRzKCc8Y29tbWFuZGFyZz4gW2NvbW1hbmRvcHRpb25hcmddJylcclxuICAgIC5hY3Rpb24oZnVuY3Rpb24gKGNvbW1hbmRhcmcsIGNvbW1hbmRvcHRpb25hcmcpIHtcclxuICAgICAgICBjb21tYW5kID0gY29tbWFuZGFyZztcclxuICAgICAgICBjb21tYW5kT3B0aW9uID0gY29tbWFuZG9wdGlvbmFyZztcclxuICAgIH0pO1xyXG4gXHJcbnBsdWdpbnMuY29tbWFuZGVyLnBhcnNlKHByb2Nlc3MuYXJndik7XHJcbiBcclxuaWYgKHR5cGVvZiBjb21tYW5kID09PSAndW5kZWZpbmVkJykge1xyXG4gICAgY29uc29sZS5lcnJvcignbm8gY29tbWFuZCBnaXZlbiEnKTtcclxuICAgIHByb2Nlc3MuZXhpdCgxKTtcclxufVxyXG5cclxuc3dpdGNoIChjb21tYW5kKXtcclxuICAgIGNhc2UgXCJpbnN0YWxsXCI6XHJcbiAgICAgICAgaW5zdGFsbChjb21tYW5kT3B0aW9uKTtcclxuICAgICAgICBicmVhaztcclxuICAgIGNhc2UgXCJ0ZXN0XCI6XHJcbiAgICAgICAgdGVzdChjb21tYW5kT3B0aW9uKTtcclxuICAgICAgICBicmVhaztcclxuICAgIGNhc2UgXCJwdWJsaXNoXCI6XHJcbiAgICAgICAgcHVibGlzaCgpO1xyXG4gICAgICAgIGJyZWFrO1xyXG4gICAgZGVmYXVsdDpcclxuICAgICAgICBicmVhaztcclxufVxyXG5cclxuIl19