83 lines
8.1 KiB
JavaScript
83 lines
8.1 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_clean_1 = require("./npmci.clean");
|
|
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);
|
|
});
|
|
// clean
|
|
smartcli.addCommand({
|
|
commandName: "clean"
|
|
}).then(function (argv) {
|
|
npmci_clean_1.clean()
|
|
.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLElBQVksT0FBTyxXQUFNLGlCQUFpQixDQUFDLENBQUE7QUFDM0MsSUFBWSxLQUFLLFdBQU0sZUFBZSxDQUFDLENBQUE7QUFDdkMsSUFBSSxTQUFTLEdBQUcsSUFBSSxPQUFPLENBQUMsV0FBVyxDQUFDLGNBQWMsQ0FBQyxLQUFLLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztBQUMvRSxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxpQkFBaUIsR0FBRyxTQUFTLENBQUMsT0FBTyxDQUFDLENBQUM7QUFFN0QsNEJBQW9CLGVBQ3BCLENBQUMsQ0FEa0M7QUFDbkMsNEJBQW9CLGVBQWUsQ0FBQyxDQUFBO0FBQ3BDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3hDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3hDLDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3hDLDhCQUFzQ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