npmci/dist/index.js

83 lines
8.1 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");
2016-06-09 01:42:12 +00:00
var paths = require("./npmci.paths");
var npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot);
plugins.beautylog.log("npmci version: " + npmciInfo.version);
2016-06-02 23:58:37 +00:00
var npmci_build_1 = require("./npmci.build");
2016-06-26 02:54:10 +00:00
var npmci_clean_1 = require("./npmci.clean");
2016-06-11 18:44:56 +00:00
var npmci_command_1 = require("./npmci.command");
2016-05-30 00:29:30 +00:00
var npmci_install_1 = require("./npmci.install");
var npmci_publish_1 = require("./npmci.publish");
2016-06-02 11:08:15 +00:00
var npmci_prepare_1 = require("./npmci.prepare");
2016-06-02 23:58:37 +00:00
var npmci_test_1 = require("./npmci.test");
2016-06-01 04:49:59 +00:00
var npmci_trigger_1 = require("./npmci.trigger");
2016-06-07 10:36:00 +00:00
var NpmciEnv = require("./npmci.env");
var npmci_build_2 = require("./npmci.build");
exports.build = npmci_build_2.build;
var npmci_install_2 = require("./npmci.install");
exports.install = npmci_install_2.install;
var npmci_publish_2 = require("./npmci.publish");
exports.publish = npmci_publish_2.publish;
2016-06-25 10:28:51 +00:00
var smartcli = new plugins.smartcli.Smartcli();
smartcli.addVersion(npmciInfo.version);
// build
smartcli.addCommand({
commandName: "build"
}).then(function (argv) {
npmci_build_1.build(argv._[1])
.then(NpmciEnv.configStore);
2016-05-30 00:29:30 +00:00
});
2016-06-26 02:54:10 +00:00
// clean
smartcli.addCommand({
commandName: "clean"
}).then(function (argv) {
npmci_clean_1.clean()
.then(NpmciEnv.configStore);
});
2016-06-25 10:28:51 +00:00
// command
smartcli.addCommand({
commandName: "command"
}).then(function (argv) {
npmci_command_1.command()
.then(NpmciEnv.configStore);
});
// install
smartcli.addCommand({
commandName: "install"
}).then(function (argv) {
npmci_install_1.install(argv._[1])
.then(NpmciEnv.configStore);
});
// prepare
smartcli.addCommand({
commandName: "prepare"
}).then(function (argv) {
npmci_prepare_1.prepare(argv._[1])
.then(NpmciEnv.configStore);
});
// publish
smartcli.addCommand({
commandName: "publish"
}).then(function (argv) {
npmci_publish_1.publish(argv._[1])
.then(NpmciEnv.configStore);
});
// test
smartcli.addCommand({
commandName: "test"
}).then(function (argv) {
npmci_test_1.test(argv._[1])
.then(NpmciEnv.configStore);
});
// trigger
smartcli.addCommand({
commandName: "trigger"
}).then(function (argv) {
npmci_trigger_1.trigger();
});
smartcli.startParse();
2016-05-30 00:29:30 +00:00
2016-06-26 02:54:10 +00:00
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLElBQVksT0FBTyxXQUFNLGlCQUFpQixDQUFDLENBQUE7QUFDM0MsSUFBWSxLQUFLLFdBQU0sZUFBZSxDQUFDLENBQUE7QUFDdkMsSUFBSSxTQUFTLEdBQUcsSUFBSSxPQUFPLENBQUMsV0FBVyxDQUFDLGNBQWMsQ0FBQyxLQUFLLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztBQUMvRSxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxpQkFBaUIsR0FBRyxTQUFTLENBQUMsT0FBTyxDQUFDLENBQUM7QUFFN0QsNEJBQW9CLGVBQ3BCLENBQUMsQ0FEa0M7QUFDbkMsNEJBQW9CLGVBQWUsQ0FBQyxDQUFBO0FBQ3BDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3hDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3hDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3hDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3h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