UNPKG

@qbyco/tjs-cli

Version:

TrafaletJS CLI Tool

33 lines (24 loc) 635 B
const fs = require('fs'); const path = require('path'); const CLICommand = require("../../lib/cli/Command/CLICommand"); class Version extends CLICommand { constructor (lib) { super('version'); this.lib = lib; } mainAction () { const npmConfig = require('../../package'); console.log(this.lib.chalk.green.bold('tjs-cli version:', npmConfig.version)); } help () { const help = new Map(); help.set(null,'show CLI version'); return help; } } module.exports = { init: function (lib) { lib.cli.getRepository().addCommand(new Version(lib)); }, run: function (lib) {} };