From 67c842d81cb9975967654e148be2d630fb372c20 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Fri, 2 Feb 2018 00:38:17 -0800 Subject: [PATCH] fix: prep for lodash templating --- src/commands/help.ts | 5 +---- src/global.d.ts | 3 --- test/commands/help.test.ts | 4 ++-- test/root.test.ts | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/commands/help.ts b/src/commands/help.ts index fdf4d833..5c129e52 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -1,13 +1,10 @@ import {Command, flags, parse} from '@anycli/command' -import {IConfig} from '@anycli/config' import cli from 'cli-ux' import Help from '..' -const config: IConfig = global.anycli.config - export default class HelpCommand extends Command { - static title = `display help for ${config.bin}` + static title = 'display help for <%= config.bin %>' static flags = { all: flags.boolean({description: 'see all commands in CLI'}), format: flags.enum({description: 'output in a different format', options: ['markdown', 'man']}), diff --git a/src/global.d.ts b/src/global.d.ts index cf38ab9a..966bfe67 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -3,8 +3,5 @@ declare namespace NodeJS { interface Global { 'columns': number - anycli: { - config: any - } } } diff --git a/test/commands/help.test.ts b/test/commands/help.test.ts index 5c8fb058..63c6d0e1 100644 --- a/test/commands/help.test.ts +++ b/test/commands/help.test.ts @@ -5,7 +5,7 @@ describe('help command', () => { .stdout() .command(['help', 'help']) .it('shows help command help', ctx => { - expect(ctx.stdout).to.equal(`display help for anycli + expect(ctx.stdout).to.equal(`display help for <%= config.bin %> USAGE $ anycli help [COMMAND] [OPTIONS] @@ -33,7 +33,7 @@ DESCRIPTION standard help for anycli COMMANDS - help display help for anycli + help display help for <%= config.bin %> plugins plugins:install plugins:uninstall diff --git a/test/root.test.ts b/test/root.test.ts index 0c429752..9f124809 100644 --- a/test/root.test.ts +++ b/test/root.test.ts @@ -30,7 +30,7 @@ DESCRIPTION standard help for anycli COMMANDS - help display help for anycli + help display help for <%= config.bin %> plugins plugins:install plugins:uninstall