UNPKG

nuevo-cli

Version:
21 lines (16 loc) 467 B
const { Command, flags } = require('@oclif/command') class HelloCommand extends Command { run () { const { flags } = this.parse(HelloCommand) const name = flags.name || 'world' this.log(`hello ${name} from ./src/commands/hello.js`) } } HelloCommand.description = `Describe the command here ... Extra documentation goes here ` HelloCommand.flags = { name: flags.string({ char: 'n', description: 'name to print' }) } module.exports = HelloCommand