This commit is contained in:
2024-11-09 01:35:02 -05:00
parent aec5a9673f
commit 112e4f98b7
24 changed files with 7113 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
import {Args, Command, Flags} from '@oclif/core'
export default class Hello extends Command {
static args = {
person: Args.string({description: 'Person to say hello to', required: true}),
}
static description = 'Say hello'
static examples = [
`<%= config.bin %> <%= command.id %> friend --from oclif
hello friend from oclif! (./src/commands/hello/index.ts)
`,
]
static flags = {
from: Flags.string({char: 'f', description: 'Who is saying hello', required: true}),
}
async run(): Promise<void> {
const {args, flags} = await this.parse(Hello)
this.log(`hello ${args.person} from ${flags.from}! (./src/commands/hello/index.ts)`)
}
}
+19
View File
@@ -0,0 +1,19 @@
import {Command} from '@oclif/core'
export default class World extends Command {
static args = {}
static description = 'Say hello world'
static examples = [
`<%= config.bin %> <%= command.id %>
hello world! (./src/commands/hello/world.ts)
`,
]
static flags = {}
async run(): Promise<void> {
this.log('hello world! (./src/commands/hello/world.ts)')
}
}
+1
View File
@@ -0,0 +1 @@
export {run} from '@oclif/core'