This commit is contained in:
2024-11-12 22:32:21 -05:00
parent 59a08dc5ba
commit 0ed24ed43b
7 changed files with 0 additions and 171 deletions
-25
View File
@@ -1,25 +0,0 @@
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)`)
}
}
-23
View File
@@ -1,23 +0,0 @@
import {Command} from '@oclif/core'
import { jjConfigs } from '@src/index'
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> {
console.log(jjConfigs)
this.log('hello world! (./src/commands/hello/world.ts)')
this.warn('warn')
this.debug('jjjjjjj')
}
}
-15
View File
@@ -1,15 +0,0 @@
import { Hook } from '@oclif/core'
const hook: Hook<'postrun'> = async function (opts: any) {
// srmVersion
// console.log(opts.Command.flags)
// console.log(opts.Command.args)
// console.log(opts.Command.name)
// console.log(opts)
// process.stdout.write(`example hook running ${opts?.id}\n`)
}
export default hook
-30
View File
@@ -1,30 +0,0 @@
import { Hook, Command } from '@oclif/core'
import fs from 'fs-extra';
import _ from 'lodash';
import { jjEnsure } from '@helpers/jjEnsure';
import { jjConfigs } from '@src/index';
const hook: Hook<'prerun'> = async function (opts) {
await jjEnsure(opts)
Object.assign(process.env, jjConfigs.processEnvs);
// srmVersion
// console.log(opts.Command.flags)
// console.log(opts.Command.args)
// console.log(opts.Command.name)
}
export default hook