@anycli/example-plugin-js
Version:
example dxcli plugin in javascript
16 lines (12 loc) • 360 B
JavaScript
const {Command, flags} = require('@anycli/command')
class HelloCommand extends Command {
async run() {
const {flags} = this.parse(HelloCommand)
const name = flags.name || 'world'
this.log(`hello ${name} from hello!`)
}
}
HelloCommand.flags = {
name: flags.string({char: 'n', description: 'name to print'}),
}
module.exports = HelloCommand