From dc2cedfcf0fb1185852f89e7386a88b753feb077 Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Tue, 12 Jun 2018 11:15:45 +0800 Subject: [PATCH] fix: Added clarifications to the behaviour of plugin:install and plugin:link (#47) Previously was in #45 --- src/commands/plugins/install.ts | 4 ++++ src/commands/plugins/link.ts | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/commands/plugins/install.ts b/src/commands/plugins/install.ts index 18d8fc62..a8f7053b 100644 --- a/src/commands/plugins/install.ts +++ b/src/commands/plugins/install.ts @@ -7,6 +7,10 @@ import Plugins from '../../plugins' export default class PluginsInstall extends Command { 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. + +e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in the CLI without the need to patch and update the whole CLI. ` static usage = 'plugins:install PLUGIN...' static examples = [ diff --git a/src/commands/plugins/link.ts b/src/commands/plugins/link.ts index 079f89dd..3db7b834 100644 --- a/src/commands/plugins/link.ts +++ b/src/commands/plugins/link.ts @@ -5,7 +5,12 @@ 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. +` + static usage = 'plugins:link PLUGIN' static examples = ['$ <%= config.bin %> plugins:link <%- config.pjson.oclif.examplePlugin || "myplugin" %> '] static args = [{name: 'path', description: 'path to plugin', required: true, default: '.'}]