UNPKG

tsm-cli

Version:

Simple way to manage typescipt and angular2 submodules from one repository

29 lines (28 loc) 984 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const npm_submodules_1 = require("npm-submodules"); const commands_1 = require("../commands"); // command - string, cli.inputs[0] // cli - meow object function main(command, cli) { // todo: can I generate this? return run(command, cli); } exports.main = main; function run(command, cli) { switch (command) { case 'build': return commands_1.buildTsRun(cli); case 'link': return npm_submodules_1.npmLinkRun(cli); case 'version': return npm_submodules_1.npmVersionRun(cli); case 'dist-tag': return npm_submodules_1.npmDistTagRun(cli); case 'publish': return npm_submodules_1.npmPublishRun(cli, { buildCommand: commands_1.buildCommand }); default: throw new Error(`You are using unknown command '${command}', please refer to help for a list of available commands`); } }