75 lines
7.5 KiB
JavaScript
75 lines
7.5 KiB
JavaScript
#!/usr/bin/env node
|
|
"use strict";
|
|
require("typings-global");
|
|
var plugins = require("./npmci.plugins");
|
|
var paths = require("./npmci.paths");
|
|
var npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot);
|
|
plugins.beautylog.log("npmci version: " + npmciInfo.version);
|
|
var npmci_build_1 = require("./npmci.build");
|
|
var npmci_command_1 = require("./npmci.command");
|
|
var npmci_install_1 = require("./npmci.install");
|
|
var npmci_publish_1 = require("./npmci.publish");
|
|
var npmci_prepare_1 = require("./npmci.prepare");
|
|
var npmci_test_1 = require("./npmci.test");
|
|
var npmci_trigger_1 = require("./npmci.trigger");
|
|
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;
|
|
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);
|
|
});
|
|
// 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();
|
|
|
|
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLElBQVksT0FBTyxXQUFNLGlCQUFpQixDQUFDLENBQUE7QUFDM0MsSUFBWSxLQUFLLFdBQU0sZUFBZSxDQUFDLENBQUE7QUFDdkMsSUFBSSxTQUFTLEdBQUcsSUFBSSxPQUFPLENBQUMsV0FBVyxDQUFDLGNBQWMsQ0FBQyxLQUFLLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztBQUMvRSxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxpQkFBaUIsR0FBRyxTQUFTLENBQUMsT0FBTyxDQUFDLENBQUM7QUFFN0QsNEJBQW9CLGVBQ3BCLENBQUMsQ0FEa0M7QUFDbkMsOEJBQXNCLGlCQUFpQixDQUFDLENBQUE7QUFDeEMsOEJBQXNCLGlCQUFpQixDQUFDLENBQUE7QUFDeEMsOEJBQXNCLGlCQUFpQixDQUFDLENBQUE7QUFDeEMsOEJBQXNCLGlCQUFpQixDQUFDLENBQUE7QUFFeEMsMkJBQW1CLGNBQWMsQ0FBQyxDQUFBO0FBQ2xDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3hDLElBQVksUUFBUSxXQUFNLGFBQWEsQ0FBQyxDQUFBO0FBRXhDLDRCQUFvQixlQ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