UNPKG

ffsnode

Version:

[WIP] A simple, efficient Node version manager that aims to be fast, predictable, and frustration-free.

23 lines (22 loc) 840 B
#!/usr/bin/env node "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const yargs_1 = __importDefault(require("yargs")); const helpers_1 = require("yargs/helpers"); const why_1 = require("./commands/why"); // Create the CLI application (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)) .scriptName('ffsnode') .usage('$0 <cmd>') .command(why_1.whyCommand) .demandCommand(1, 'Hey there! Try "ffsnode why" when you need a little encouragement') .help() .strict() .fail((msg, err, yargs) => { console.log('It looks like you might be having a tough time. Try "ffsnode why" for some encouragement.'); process.exit(1); }) .parse();