Skip to content

Commit

Permalink
fix: adjust help text to new style guide (#328)
Browse files Browse the repository at this point in the history
@W-9928119@
  • Loading branch information
peternhale authored Sep 27, 2021
1 parent 0a26dde commit e8f1244
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 41 deletions.
6 changes: 3 additions & 3 deletions src/commands/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import {sortBy} from '../../util'

export default class PluginsIndex extends Command {
static flags = {
core: Flags.boolean({description: 'show core plugins'}),
core: Flags.boolean({description: 'Show core plugins.'}),
}

static description = 'list installed plugins'
static description = 'List installed plugins.'

static examples = ['$ <%- config.bin %> plugins']

Expand All @@ -24,7 +24,7 @@ export default class PluginsIndex extends Command {
plugins = plugins.filter(p => p.type !== 'core' && p.type !== 'dev')
}
if (plugins.length === 0) {
this.log('no plugins installed')
this.log('No plugins installed.')
return
}
this.display(plugins as Plugin[])
Expand Down
4 changes: 2 additions & 2 deletions src/commands/plugins/inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Dependencies = {
}

export default class PluginsInspect extends Command {
static description = 'displays installation properties of a plugin';
static description = 'Displays installation properties of a plugin.';

static usage = 'plugins:inspect PLUGIN...';

Expand All @@ -31,7 +31,7 @@ export default class PluginsInspect extends Command {
static strict = false;

static args = [
{name: 'plugin', description: 'plugin to inspect', required: true, default: '.'},
{name: 'plugin', description: 'Plugin to inspect.', required: true, default: '.'},
];

static flags = {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/plugins/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cli from 'cli-ux'
import Plugins from '../../plugins'

export default class PluginsInstall extends Command {
static description = `installs a plugin into the CLI
static description = `Installs a plugin into the CLI.
Can be installed from npm or a git url.
Installation of a user-installed plugin will override a core plugin.
Expand All @@ -24,15 +24,15 @@ e.g. If you have a core plugin that has a 'hello' command, installing a user-ins
static strict = false;

static args = [
{name: 'plugin', description: 'plugin to install', required: true},
{name: 'plugin', description: 'Plugin to install.', required: true},
];

static flags = {
help: Flags.help({char: 'h'}),
verbose: Flags.boolean({char: 'v'}),
force: Flags.boolean({
char: 'f',
description: 'yarn install with force flag',
description: 'Run yarn install with force flag.',
}),
};

Expand Down
2 changes: 1 addition & 1 deletion src/commands/plugins/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cli from 'cli-ux'
import Plugins from '../../plugins'

export default class PluginsLink extends Command {
static description = `links a plugin into the CLI for development
static description = `Links a plugin into the CLI for development.
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello' command will override the user-installed or core plugin implementation. This is useful for development work.
Expand Down
2 changes: 1 addition & 1 deletion src/commands/plugins/uninstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cli from 'cli-ux'
import Plugins from '../../plugins'

export default class PluginsUninstall extends Command {
static description = 'removes a plugin from the CLI'
static description = 'Removes a plugin from the CLI.'

static usage = 'plugins:uninstall PLUGIN...'

Expand Down
2 changes: 1 addition & 1 deletion src/commands/plugins/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class PluginsUpdate extends Command {

static command = 'update'

static description = 'update installed plugins'
static description = 'Update installed plugins.'

static flags = {
help: Flags.help({char: 'h'}),
Expand Down
12 changes: 6 additions & 6 deletions test/commands/plugins/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('command', () => {
.command(['plugins:uninstall', '@heroku-cli/plugin-@oclif/example-plugin-ts'])
.stdout()
.command(['plugins'], {reset: true})
.do(output => expect(output.stdout).to.equal('no plugins installed\n'))
.do(output => expect(output.stdout).to.equal('No plugins installed.\n'))
.it('installs and uninstalls @oclif/example-plugin-ts')

test
Expand All @@ -23,7 +23,7 @@ describe('command', () => {
.command(['plugins:uninstall', '@oclif/example-plugin-ts@latest'], {reset: true})
.stdout()
.command(['plugins'], {reset: true})
.do(output => expect(output.stdout).to.equal('no plugins installed\n'))
.do(output => expect(output.stdout).to.equal('No plugins installed.\n'))
.it('installs and uninstalls @oclif/example-plugin-ts with tags')

test
Expand All @@ -37,7 +37,7 @@ describe('command', () => {
.command(['plugins:uninstall', 'oclif-debug'])
.stdout()
.command(['plugins'], {reset: true})
.do(output => expect(output.stdout).to.equal('no plugins installed\n'))
.do(output => expect(output.stdout).to.equal('No plugins installed.\n'))
.it('installs via an alias')

test
Expand All @@ -51,15 +51,15 @@ describe('command', () => {
.command(['plugins:uninstall', 'oclif-debug'])
.stdout()
.command(['plugins'], {reset: true})
.do(output => expect(output.stdout).to.equal('no plugins installed\n'))
.do(output => expect(output.stdout).to.equal('No plugins installed.\n'))
.it('installs and uninstalls jdxcode/oclif-debug')

test
.command(['plugins:install', 'stubbed'], {reset: true})
.catch(/1/)
.stdout()
.command(['plugins'], {reset: true})
.do(output => expect(output.stdout).to.equal('no plugins installed\n'))
.do(output => expect(output.stdout).to.equal('No plugins installed.\n'))
.it('does not install if unsure if scoped package does not exist')
// test
// .command(['plugins:install', 'heroku-debug@beta'], {reset: true})
Expand All @@ -80,6 +80,6 @@ describe('command', () => {
// .command(['plugins:uninstall', 'heroku-debug'])
// .stdout()
// .command(['plugins'])
// .do(output => expect(output.stdout).to.equal('no plugins installed\n'))
// .do(output => expect(output.stdout).to.equal('No plugins installed.\n'))
// .it('installs and uninstalls heroku-debug')
})
36 changes: 12 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
supports-color "^5.4.0"
tslib "^1"

"@oclif/command@^1.5.10", "@oclif/command@^1.5.12", "@oclif/command@^1.5.20", "@oclif/command@^1.6", "@oclif/command@^1.6.0", "@oclif/command@^1.8.0":
"@oclif/command@^1.5.10", "@oclif/command@^1.5.20", "@oclif/command@^1.6", "@oclif/command@^1.6.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.8.0.tgz#c1a499b10d26e9d1a611190a81005589accbb339"
integrity sha512-5vwpq6kbvwkQwKqAoOU3L72GZ3Ta8RRrewKj9OJRolx28KLJJ8Dg9Rf7obRwt5jQA9bkYd8gqzMTrI7H3xLfaw==
Expand All @@ -253,7 +253,7 @@
debug "^4.1.1"
semver "^7.3.2"

"@oclif/config@^1.12.11", "@oclif/config@^1.12.6", "@oclif/config@^1.12.8", "@oclif/config@^1.15.1", "@oclif/config@^1.17.0":
"@oclif/config@^1.12.6", "@oclif/config@^1.12.8", "@oclif/config@^1.15.1":
version "1.17.0"
resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.17.0.tgz#ba8639118633102a7e481760c50054623d09fcab"
integrity sha512-Lmfuf6ubjQ4ifC/9bz1fSCHc6F6E653oyaRXxg+lgT4+bYf9bk+nqrUpAbrXyABkCqgIBiFr3J4zR/kiFdE1PA==
Expand All @@ -265,7 +265,7 @@
is-wsl "^2.1.1"
tslib "^2.0.0"

"@oclif/core@^0.5.34":
"@oclif/core@^0.5.34", "@oclif/core@^0.5.39":
version "0.5.39"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-0.5.39.tgz#d00705f31c5e6617145e84bb9dd50156cf3b01c5"
integrity sha512-4XusxLX8PnHDQxtRP25PImlkIj1Mlx6wt0NWb1FxQGvTJOAgXGJZl3YB02ZeXZLYbeKA2A3AqqxFTTKbADnZng==
Expand All @@ -288,25 +288,6 @@
widest-line "^3.1.0"
wrap-ansi "^7.0.0"

"@oclif/dev-cli@^1.21.3":
version "1.26.0"
resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.26.0.tgz#e3ec294b362c010ffc8948003d3770955c7951fd"
integrity sha512-272udZP+bG4qahoAcpWcMTJKiA+V42kRMqQM7n4tgW35brYb2UP5kK+p08PpF8sgSfRTV8MoJVJG9ax5kY82PA==
dependencies:
"@oclif/command" "^1.8.0"
"@oclif/config" "^1.17.0"
"@oclif/errors" "^1.3.3"
"@oclif/plugin-help" "^3.2.0"
cli-ux "^5.2.1"
debug "^4.1.1"
find-yarn-workspace-root "^2.0.0"
fs-extra "^8.1"
github-slugger "^1.2.1"
lodash "^4.17.11"
normalize-package-data "^3.0.0"
qqjs "^0.3.10"
tslib "^2.0.3"

"@oclif/errors@^1.2.1", "@oclif/errors@^1.2.2", "@oclif/errors@^1.3.3":
version "1.3.4"
resolved "https://registry.yarnpkg.com/@oclif/errors/-/errors-1.3.4.tgz#a96f94536b4e25caa72eff47e8b3ed04f6995f55"
Expand Down Expand Up @@ -343,7 +324,7 @@
chalk "^2.4.2"
tslib "^1.9.3"

"@oclif/plugin-help@^3", "@oclif/plugin-help@^3.1.0", "@oclif/plugin-help@^3.2.0":
"@oclif/plugin-help@^3":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-3.2.2.tgz#063ee08cee556573a5198fbdfdaa32796deba0ed"
integrity sha512-SPZ8U8PBYK0n4srFjCLedk0jWU4QlxgEYLCXIBShJgOwPhTTQknkUlsEwaMIevvCU4iCQZhfMX+D8Pz5GZjFgA==
Expand All @@ -359,6 +340,13 @@
widest-line "^3.1.0"
wrap-ansi "^4.0.0"

"@oclif/plugin-help@^5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-5.1.0.tgz#002816410d41c8fb50157626adb6fc1889eaed89"
integrity sha512-PGbgC32OLFqciUSAjNxOWUMob/Yz5k6AwulS4X924WM6/pARQz91lqTBj4WWxNFoOSS1eT+CtB1nPmypCQXebQ==
dependencies:
"@oclif/core" "^0.5.39"

"@oclif/plugin-not-found@^1.2.2":
version "1.2.4"
resolved "https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-1.2.4.tgz#160108c82f0aa10f4fb52cee4e0135af34b7220b"
Expand Down Expand Up @@ -5308,7 +5296,7 @@ tslib@^1.9.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==

tslib@^2.0.0, tslib@^2.0.3:
tslib@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c"
integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==
Expand Down

0 comments on commit e8f1244

Please sign in to comment.