2016-05-30 00:29:30 +00:00
|
|
|
"use strict";
|
2016-07-18 14:56:53 +00:00
|
|
|
const plugins = require("./npmci.plugins");
|
|
|
|
const paths = require("./npmci.paths");
|
|
|
|
let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot);
|
2016-11-24 22:21:40 +00:00
|
|
|
plugins.beautylog.log('npmci version: ' + npmciInfo.version);
|
2016-07-18 14:56:53 +00:00
|
|
|
const npmci_build_1 = require("./npmci.build");
|
|
|
|
const npmci_clean_1 = require("./npmci.clean");
|
|
|
|
const npmci_command_1 = require("./npmci.command");
|
|
|
|
const npmci_install_1 = require("./npmci.install");
|
|
|
|
const npmci_publish_1 = require("./npmci.publish");
|
|
|
|
const npmci_prepare_1 = require("./npmci.prepare");
|
|
|
|
const npmci_test_1 = require("./npmci.test");
|
|
|
|
const npmci_trigger_1 = require("./npmci.trigger");
|
|
|
|
const NpmciEnv = require("./npmci.env");
|
2016-06-10 06:07:04 +00:00
|
|
|
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-07-18 14:56:53 +00:00
|
|
|
let smartcli = new plugins.smartcli.Smartcli();
|
2016-06-25 10:28:51 +00:00
|
|
|
smartcli.addVersion(npmciInfo.version);
|
|
|
|
// build
|
2017-02-19 13:46:05 +00:00
|
|
|
smartcli.addCommand('build')
|
|
|
|
.then((argv) => {
|
2016-06-25 10:28:51 +00:00
|
|
|
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
|
2017-02-19 13:46:05 +00:00
|
|
|
smartcli.addCommand('clean')
|
|
|
|
.then((argv) => {
|
2016-06-26 02:54:10 +00:00
|
|
|
npmci_clean_1.clean()
|
|
|
|
.then(NpmciEnv.configStore);
|
|
|
|
});
|
2016-06-25 10:28:51 +00:00
|
|
|
// command
|
2017-02-19 13:46:05 +00:00
|
|
|
smartcli.addCommand('command')
|
|
|
|
.then((argv) => {
|
2016-06-25 10:28:51 +00:00
|
|
|
npmci_command_1.command()
|
|
|
|
.then(NpmciEnv.configStore);
|
|
|
|
});
|
|
|
|
// install
|
2017-02-19 13:46:05 +00:00
|
|
|
smartcli.addCommand('install')
|
|
|
|
.then((argv) => {
|
2016-06-25 10:28:51 +00:00
|
|
|
npmci_install_1.install(argv._[1])
|
|
|
|
.then(NpmciEnv.configStore);
|
|
|
|
});
|
|
|
|
// prepare
|
2017-02-19 13:46:05 +00:00
|
|
|
smartcli.addCommand('prepare')
|
|
|
|
.then((argv) => {
|
2016-06-25 10:28:51 +00:00
|
|
|
npmci_prepare_1.prepare(argv._[1])
|
|
|
|
.then(NpmciEnv.configStore);
|
|
|
|
});
|
|
|
|
// publish
|
2017-02-19 13:46:05 +00:00
|
|
|
smartcli.addCommand('publish')
|
|
|
|
.then((argv) => {
|
2016-06-25 10:28:51 +00:00
|
|
|
npmci_publish_1.publish(argv._[1])
|
|
|
|
.then(NpmciEnv.configStore);
|
|
|
|
});
|
|
|
|
// test
|
2017-02-19 13:46:05 +00:00
|
|
|
smartcli.addCommand('test')
|
|
|
|
.then((argv) => {
|
2016-06-25 10:28:51 +00:00
|
|
|
npmci_test_1.test(argv._[1])
|
|
|
|
.then(NpmciEnv.configStore);
|
|
|
|
});
|
|
|
|
// trigger
|
2017-02-19 13:46:05 +00:00
|
|
|
smartcli.addCommand('trigger')
|
|
|
|
.then((argv) => {
|
2016-06-25 10:28:51 +00:00
|
|
|
npmci_trigger_1.trigger();
|
|
|
|
});
|
|
|
|
smartcli.startParse();
|
2017-02-19 13:46:05 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguan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