From 550e942162a43fb1b789a4bc492b6378b25197a5 Mon Sep 17 00:00:00 2001 From: p-sw Date: Thu, 6 Jun 2024 19:05:41 +0900 Subject: [PATCH] feat: remove commands This commit deletes all template commands and related tests from the CLI package. The template command implementation and its associated tests have been fully removed to make way for new feature implementation. --- packages/cli/src/commands/hello/index.ts | 25 ------------------- packages/cli/src/commands/hello/world.ts | 19 -------------- .../cli/test/commands/hello/index.test.ts | 9 ------- .../cli/test/commands/hello/world.test.ts | 9 ------- 4 files changed, 62 deletions(-) delete mode 100644 packages/cli/src/commands/hello/index.ts delete mode 100644 packages/cli/src/commands/hello/world.ts delete mode 100644 packages/cli/test/commands/hello/index.test.ts delete mode 100644 packages/cli/test/commands/hello/world.test.ts diff --git a/packages/cli/src/commands/hello/index.ts b/packages/cli/src/commands/hello/index.ts deleted file mode 100644 index 6fe09e1..0000000 --- a/packages/cli/src/commands/hello/index.ts +++ /dev/null @@ -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 { - const {args, flags} = await this.parse(Hello) - - this.log(`hello ${args.person} from ${flags.from}! (./src/commands/hello/index.ts)`) - } -} diff --git a/packages/cli/src/commands/hello/world.ts b/packages/cli/src/commands/hello/world.ts deleted file mode 100644 index 8111043..0000000 --- a/packages/cli/src/commands/hello/world.ts +++ /dev/null @@ -1,19 +0,0 @@ -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 { - this.log('hello world! (./src/commands/hello/world.ts)') - } -} diff --git a/packages/cli/test/commands/hello/index.test.ts b/packages/cli/test/commands/hello/index.test.ts deleted file mode 100644 index dad0ac3..0000000 --- a/packages/cli/test/commands/hello/index.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import {runCommand} from '@oclif/test' -import {expect} from 'chai' - -describe('hello', () => { - it('runs hello', async () => { - const {stdout} = await runCommand('hello friend --from oclif') - expect(stdout).to.contain('hello friend from oclif!') - }) -}) diff --git a/packages/cli/test/commands/hello/world.test.ts b/packages/cli/test/commands/hello/world.test.ts deleted file mode 100644 index 0f5e90f..0000000 --- a/packages/cli/test/commands/hello/world.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import {runCommand} from '@oclif/test' -import {expect} from 'chai' - -describe('hello world', () => { - it('runs hello world cmd', async () => { - const {stdout} = await runCommand('hello world') - expect(stdout).to.contain('hello world!') - }) -})