diff --git a/README.md b/README.md index cc6edc0..a9f7499 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ plugin-test-esbuild-single ================= -Example of using `esbuild` with oclif +Example of using `esbuild` to bundle a CLI into a single executable. **This is not an officially support use case. There may be severe limitations to using this approach.** [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) [![CircleCI](https://circleci.com/gh/oclif/hello-world/tree/main.svg?style=shield)](https://circleci.com/gh/oclif/hello-world/tree/main) @@ -27,21 +27,24 @@ USAGE # Commands -* [`bundle esbuild [OPTIONALARG] [DEFAULTARG] [DEFAULTFNARG]`](#bundle-esbuild-optionalarg-defaultarg-defaultfnarg) -* [`bundle hello PERSON`](#bundle-hello-person) -* [`bundle hello alias`](#bundle-hello-alias) -* [`bundle hello world`](#bundle-hello-world) -* [`bundle help [COMMANDS]`](#bundle-help-commands) -* [`bundle plugins`](#bundle-plugins) -* [`bundle plugins:install PLUGIN...`](#bundle-pluginsinstall-plugin) -* [`bundle plugins:inspect PLUGIN...`](#bundle-pluginsinspect-plugin) -* [`bundle plugins:install PLUGIN...`](#bundle-pluginsinstall-plugin-1) -* [`bundle plugins:link PLUGIN`](#bundle-pluginslink-plugin) -* [`bundle plugins:uninstall PLUGIN...`](#bundle-pluginsuninstall-plugin) -* [`bundle plugins reset`](#bundle-plugins-reset) -* [`bundle plugins:uninstall PLUGIN...`](#bundle-pluginsuninstall-plugin-1) -* [`bundle plugins:uninstall PLUGIN...`](#bundle-pluginsuninstall-plugin-2) -* [`bundle plugins update`](#bundle-plugins-update) +- [plugin-test-esbuild-single](#plugin-test-esbuild-single) +- [Usage](#usage) +- [Commands](#commands) + - [`bundle esbuild [OPTIONALARG] [DEFAULTARG] [DEFAULTFNARG]`](#bundle-esbuild-optionalarg-defaultarg-defaultfnarg) + - [`bundle hello PERSON`](#bundle-hello-person) + - [`bundle hello alias`](#bundle-hello-alias) + - [`bundle hello world`](#bundle-hello-world) + - [`bundle help [COMMANDS]`](#bundle-help-commands) + - [`bundle plugins`](#bundle-plugins) + - [`bundle plugins:install PLUGIN...`](#bundle-pluginsinstall-plugin) + - [`bundle plugins:inspect PLUGIN...`](#bundle-pluginsinspect-plugin) + - [`bundle plugins:install PLUGIN...`](#bundle-pluginsinstall-plugin-1) + - [`bundle plugins:link PLUGIN`](#bundle-pluginslink-plugin) + - [`bundle plugins:uninstall PLUGIN...`](#bundle-pluginsuninstall-plugin) + - [`bundle plugins reset`](#bundle-plugins-reset) + - [`bundle plugins:uninstall PLUGIN...`](#bundle-pluginsuninstall-plugin-1) + - [`bundle plugins:uninstall PLUGIN...`](#bundle-pluginsuninstall-plugin-2) + - [`bundle plugins update`](#bundle-plugins-update) ## `bundle esbuild [OPTIONALARG] [DEFAULTARG] [DEFAULTFNARG]` diff --git a/test/commands/commands-from-plugins.test.ts b/test/commands/commands-from-plugins.test.ts deleted file mode 100644 index c8ec073..0000000 --- a/test/commands/commands-from-plugins.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {expect, test} from '@oclif/test' - -describe('esm1 (@oclif/plugin-test-esm-1)', () => { - test - .stdout() - .command(['esm1']) - .it('runs esm1 cmd from @oclif/plugin-test-esm-1', (ctx) => { - expect(ctx.stdout).to.contain('hello I am an ESM plugin from') - }) -}) diff --git a/test/commands/esbuild.test.ts b/test/commands/esbuild.test.ts deleted file mode 100644 index c4b85f6..0000000 --- a/test/commands/esbuild.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {expect, test} from '@oclif/test' - -describe('esbuild', () => { - test - .stdout() - .command(['esbuild']) - .it('runs esbuild cmd', (ctx) => { - expect(ctx.stdout).to.contain('hello I am a bundled (esbuild) plugin') - }) -}) diff --git a/test/commands/hello/index.test.ts b/test/commands/hello/index.test.ts deleted file mode 100644 index f4e5ebe..0000000 --- a/test/commands/hello/index.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {expect, test} from '@oclif/test' - -describe('hello', () => { - test - .stdout() - .command(['hello', 'friend', '--from=oclif']) - .it('runs hello cmd', ctx => { - expect(ctx.stdout).to.contain('hello friend from oclif!') - }) -}) diff --git a/test/commands/hello/world.test.ts b/test/commands/hello/world.test.ts deleted file mode 100644 index f11b33c..0000000 --- a/test/commands/hello/world.test.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {expect, test} from '@oclif/test' - -describe('hello world', () => { - test - .stdout() - .command(['hello:world']) - .it('runs hello world cmd', (ctx) => { - expect(ctx.stdout).to.contain('hello world!') - }) -}) - -describe('hello alias', () => { - test - .stdout() - .command(['hello:alias']) - .it('runs hello alias cmd', (ctx) => { - expect(ctx.stdout).to.contain('hello world!') - }) -}) diff --git a/test/hooks/hooks-from-plugins.test.ts b/test/hooks/hooks-from-plugins.test.ts deleted file mode 100644 index fd4a6c9..0000000 --- a/test/hooks/hooks-from-plugins.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import {expect, test} from '@oclif/test' - -describe('hooks (@oclif/plugin-test-esm-1)', () => { - test - .stdout() - .hook('init', {id: 'mycommand'}) - .do((output) => expect(output.stdout).to.contain('Greetings! from plugin-test-esm-1 init hook')) - .it('shows a message') -}) diff --git a/test/hooks/init/init.test.ts b/test/hooks/init/init.test.ts deleted file mode 100644 index 35e0751..0000000 --- a/test/hooks/init/init.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import {expect, test} from '@oclif/test' - -describe('hooks', () => { - test - .stdout() - .hook('init', {id: 'mycommand'}) - .do((output) => expect(output.stdout).to.contain('Greetings! from plugin-test-esbuild-single init hook')) - .it('shows a message') -})