UNPKG

tiny-bin

Version:

A library for building tiny and beautiful command line apps.

20 lines (19 loc) 444 B
/* IMPORT */ import Command from './command.js'; /* MAIN */ class CommandVersion extends Command { /* CONSTRUCTOR */ constructor(bin) { super(bin, { name: '_version', description: 'Display the version number', hidden: true }); } /* API */ async run(options, argv) { this.stdout.print(this.bin.metadata.version); } } /* EXPORT */ export default CommandVersion;