1 | const {Command, flags} = require('@oclif/command')
|
2 |
|
3 | class OclifExampleSingleJsCommand extends Command {
|
4 | async run() {
|
5 | const {flags} = this.parse(OclifExampleSingleJsCommand)
|
6 | const name = flags.name || 'world'
|
7 | this.log(`hello ${name} from ./src/index.js`)
|
8 | }
|
9 | }
|
10 |
|
11 | OclifExampleSingleJsCommand.description = `
|
12 | Describe the command here
|
13 | ...
|
14 | Extra documentation goes here
|
15 | `
|
16 |
|
17 | OclifExampleSingleJsCommand.flags = {
|
18 |
|
19 | version: flags.version({char: 'v'}),
|
20 |
|
21 | help: flags.help({char: 'h'}),
|
22 | name: flags.string({char: 'n', description: 'name to print'}),
|
23 | }
|
24 |
|
25 | module.exports = OclifExampleSingleJsCommand
|