UNPKG

tiny-bin

Version:

A library for building tiny and beautiful command line apps.

28 lines (27 loc) 661 B
/* IMPORT */ import { ENABLED } from 'tiny-colors'; import colors from 'tiny-colors'; import Addon from './addon.js'; /* MAIN */ class Config extends Addon { constructor() { /* VARIABLES */ super(...arguments); this.name = 'bin'; this.description = ''; this.package = ''; this.version = ''; this.colors = ENABLED; this.autoExit = true; } /* API */ print() { this.stdout.print(`${colors.cyan(this.name)} ${colors.dim(this.version)}`); this.stdout.print(); } update(options) { Object.assign(this, options); } } /* EXPORT */ export default Config;