UNPKG

seeli

Version:
58 lines (52 loc) 1.06 kB
'use strict' /** * CLI harness module. Comes with free help command * @module seeli * @author Eric Satterwhite * @requires nopt * @requires util * @requires chaolk * @requires os * @requires seeli/lib/command * @requires seeli/lib/commands * @requires seeli/lib/conf **/ const {default: chalk} = require('chalk') const Command = require('./command') const Seeli = require('./seeli') const commands = require('./commands') const colors = [ 'red', 'blue', 'green' , 'yellow', 'bold', 'grey' , 'dim', 'black', 'magenta' , 'cyan', 'redBright', 'blueBright' , 'greenBright', 'yellowBright', 'cyanBright' ] module.exports = commands commands.Seeli = Seeli Object.defineProperties(commands, { 'Seeli': { get: () => { return Seeli } } , 'Command': { get: () => { return Command } } , 'list': { get: () => { return Array.from(commands.names) } } , 'default': { enumerable: false , get: () => { return commands } } }) colors.forEach((color) => { module.exports[color] = chalk[color] })