UNPKG

md-generator

Version:

NPM Package which bootstraps Development by creating all required .md files to meet community standards.

55 lines (54 loc) 2.11 kB
#!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var commander_1 = tslib_1.__importDefault(require("commander")); var index_1 = require("./common/index"); var ValidateOptions_1 = tslib_1.__importDefault(require("./core/validations/ValidateOptions")); commander_1.default .name('md-generator') .version('0.6.1') .action(function (command) { return index_1.wrongCommandAlert(command); }) .on('--help', function () { index_1.customHelp(); }); commander_1.default .command('list [env]') .description('list All Required/optional .md files') .option('-O --optional', 'list all optional files') .option('-R --required', 'list all required files') .action(function (_type, args) { ValidateOptions_1.default(args); }); commander_1.default .command('create [env]') .description('create All/specific files') .option('-O, --optional', 'create all optional files') .option('-R, --required', 'create all required files') .option('-A, --all [value]', 'create all required/optional .md files') .option('-F, --file [value]', 'Create specific .md files') .option('-E, --empty', 'make created files empty') .action(function (_type, args) { ValidateOptions_1.default(args); }); commander_1.default .command('check [env]') .description('check for missing .md files') .option('-O, --optional', 'check all optional files') .option('-R, --required', 'check all required files') .action(function (_type, args) { ValidateOptions_1.default(args); }); commander_1.default .command('remove [env]') .description('remove All/specific .md files') .option('-A, --all', 'remove all .md files') .option('-O, --optional', 'remove all optional files') .option('-R, --required', 'remove all required files') .option('-F, --file [value]', 'remove specific .md files') .action(function (_type, args) { ValidateOptions_1.default(args); }); if (!process.argv[2]) index_1.noCommandAlert(); commander_1.default.parse(process.argv);