npmci/dist/index.js
2016-07-18 16:56:53 +02:00

81 lines
5.4 KiB
JavaScript

#!/usr/bin/env node
"use strict";
require("typings-global");
const plugins = require("./npmci.plugins");
const paths = require("./npmci.paths");
let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot);
plugins.beautylog.log("npmci version: " + npmciInfo.version);
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");
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;
let smartcli = new plugins.smartcli.Smartcli();
smartcli.addVersion(npmciInfo.version);
// build
smartcli.addCommand({
commandName: "build"
}).then((argv) => {
npmci_build_1.build(argv._[1])
.then(NpmciEnv.configStore);
});
// clean
smartcli.addCommand({
commandName: "clean"
}).then((argv) => {
npmci_clean_1.clean()
.then(NpmciEnv.configStore);
});
// command
smartcli.addCommand({
commandName: "command"
}).then((argv) => {
npmci_command_1.command()
.then(NpmciEnv.configStore);
});
// install
smartcli.addCommand({
commandName: "install"
}).then((argv) => {
npmci_install_1.install(argv._[1])
.then(NpmciEnv.configStore);
});
// prepare
smartcli.addCommand({
commandName: "prepare"
}).then((argv) => {
npmci_prepare_1.prepare(argv._[1])
.then(NpmciEnv.configStore);
});
// publish
smartcli.addCommand({
commandName: "publish"
}).then((argv) => {
npmci_publish_1.publish(argv._[1])
.then(NpmciEnv.configStore);
});
// test
smartcli.addCommand({
commandName: "test"
}).then((argv) => {
npmci_test_1.test(argv._[1])
.then(NpmciEnv.configStore);
});
// trigger
smartcli.addCommand({
commandName: "trigger"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