UNPKG

nx-helper-cli

Version:

This is a helper cli which helps get things done fast in a monorepo. mainly it's used with [nx.dev](http://google.com) tool but has many tools that may benefit anybody working in a monorepo architecture.

34 lines 2.15 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const chalk_1 = __importDefault(require("chalk")); const figlet_1 = __importDefault(require("figlet")); const utils_1 = require("./utils"); exports.helpHandler = (args) => { console.log(chalk_1.default.bold.white(figlet_1.default.textSync('Nxer', { horizontalLayout: 'full', font: 'Doom' }))); let padMe = (text) => text.padEnd(10, ' '); console.log(chalk_1.default.white('Usage: nxer <options>')); console.log(chalk_1.default.white('')); console.log(chalk_1.default.white(`\t${padMe('--help')}this is an option to see the available options for the nxer cli\n`)); console.log(chalk_1.default.white(`\t${padMe('--config')}specify the config file you want to run the commands ex: --config file.json or --config myconfig.js\n`)); }; exports.handleConfigFile = (args) => __awaiter(void 0, void 0, void 0, function* () { yield utils_1.configToConcurrentlyAdapter(args.config); // let colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'gray']; // let result = concurrently([ // { command: 'npm run koko', name: 'KOKO MAN 1', prefixColor: 'yellow' }, // { command: 'npm run koko', name: 'KOKO MAN 2', prefixColor: 'yellow' }, // ]); }); //# sourceMappingURL=handlers.js.map