From b5d798e1b405aeb6edaa166919fa3a19357f00a9 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Tue, 6 Feb 2018 22:14:42 -0800 Subject: [PATCH] fix: added docs --- package.json | 6 +++--- src/commands/base.ts | 1 + src/commands/command.ts | 2 ++ src/commands/multi.ts | 1 + src/commands/plugin.ts | 1 + src/commands/single.ts | 1 + yarn.lock | 48 +++++++++++++++++++++++++++++++++++------ 7 files changed, 50 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 5cfb05f..60b9cb6 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,9 @@ "bugs": "https://github.com/anycli/cli/issues", "dependencies": { "@anycli/command": "^1.2.14", - "@anycli/config": "^1.3.32", + "@anycli/config": "^1.3.36", "@anycli/errors": "^0.2.1", - "@anycli/plugin-help": "^0.6.9", + "@anycli/plugin-help": "^0.7.0", "@anycli/plugin-not-found": "^0.1.18", "debug": "^3.1.0", "fixpack": "^2.3.1", @@ -30,7 +30,7 @@ "yosay": "^2.0.1" }, "devDependencies": { - "@anycli/dev-cli": "^0.3.4", + "@anycli/dev-cli": "^0.3.7", "@anycli/tslint": "^0.2.7", "@types/lodash": "^4.14.101", "@types/read-pkg": "^3.0.0", diff --git a/src/commands/base.ts b/src/commands/base.ts index 53bb49f..9b1ca8a 100644 --- a/src/commands/base.ts +++ b/src/commands/base.ts @@ -1,5 +1,6 @@ import AppCommand from '../app_command' export default class extends AppCommand { + static hidden = true type = 'base' } diff --git a/src/commands/command.ts b/src/commands/command.ts index 137cdfb..57d0aeb 100644 --- a/src/commands/command.ts +++ b/src/commands/command.ts @@ -9,6 +9,8 @@ export interface Options { } export default abstract class AppCommand extends Base { + static description = 'add a command to an existing CLI or plugin' + static flags = { defaults: flags.boolean({description: 'use defaults for every setting'}), force: flags.boolean({description: 'overwrite existing files'}), diff --git a/src/commands/multi.ts b/src/commands/multi.ts index 1de2782..759a1bd 100644 --- a/src/commands/multi.ts +++ b/src/commands/multi.ts @@ -1,5 +1,6 @@ import AppCommand from '../app_command' export default class extends AppCommand { + static description = 'generate a new multi-command CLI' type = 'multi' } diff --git a/src/commands/plugin.ts b/src/commands/plugin.ts index 2ce48f6..7d55a9f 100644 --- a/src/commands/plugin.ts +++ b/src/commands/plugin.ts @@ -1,5 +1,6 @@ import AppCommand from '../app_command' export default class extends AppCommand { + static description = 'create a new CLI plugin' type = 'plugin' } diff --git a/src/commands/single.ts b/src/commands/single.ts index 5e60eff..0a5e6f6 100644 --- a/src/commands/single.ts +++ b/src/commands/single.ts @@ -1,5 +1,6 @@ import AppCommand from '../app_command' export default class extends AppCommand { + static description = 'generate a new single-command CLI' type = 'single' } diff --git a/yarn.lock b/yarn.lock index d74bc30..a66e5c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8,20 +8,22 @@ dependencies: "@anycli/parser" "^3.2.6" -"@anycli/config@^1.3.32": - version "1.3.32" - resolved "https://registry.yarnpkg.com/@anycli/config/-/config-1.3.32.tgz#6e27153046cbb7cdc3783b698628221afeaf4010" +"@anycli/config@^1.3.36": + version "1.3.36" + resolved "https://registry.yarnpkg.com/@anycli/config/-/config-1.3.36.tgz#ea69dd7b708c6d2543e3f13481bd2f6bca69fa83" -"@anycli/dev-cli@^0.3.4": - version "0.3.4" - resolved "https://registry.yarnpkg.com/@anycli/dev-cli/-/dev-cli-0.3.4.tgz#2f20b8a928febc61db4fd76bde56d1b63538bc26" +"@anycli/dev-cli@^0.3.7": + version "0.3.7" + resolved "https://registry.yarnpkg.com/@anycli/dev-cli/-/dev-cli-0.3.7.tgz#b03996f6f4973649b520a2ffe41c772035d68c59" dependencies: "@anycli/command" "^1.2.14" - "@anycli/config" "^1.3.32" + "@anycli/config" "^1.3.36" "@anycli/errors" "^0.2.1" "@anycli/plugin-help" "^0.6.9" lodash.template "^4.4.0" normalize-package-data "^2.4.0" + require-relative "^0.8.7" + require-resolve "^0.0.2" "@anycli/errors@^0.2.1": version "0.2.1" @@ -49,6 +51,18 @@ widest-line "^2.0.0" wrap-ansi "^3.0.1" +"@anycli/plugin-help@^0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@anycli/plugin-help/-/plugin-help-0.7.0.tgz#dda7324ab6f5d8bf16deb4f7017301196ea1b22e" + dependencies: + "@anycli/command" "^1.2.14" + chalk "^2.3.0" + indent-string "^3.2.0" + lodash.template "^4.4.0" + string-width "^2.1.1" + widest-line "^2.0.0" + wrap-ansi "^3.0.1" + "@anycli/plugin-not-found@^0.1.18": version "0.1.18" resolved "https://registry.yarnpkg.com/@anycli/plugin-not-found/-/plugin-not-found-0.1.18.tgz#2dcf08cb80f03d81a262b7f36eb722a47be269b5" @@ -1877,6 +1891,10 @@ path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" +path-extra@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/path-extra/-/path-extra-1.0.3.tgz#7c112189a6e50d595790e7ad2037e44e410c1166" + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -2106,6 +2124,16 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" +require-relative@^0.8.7: + version "0.8.7" + resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" + +require-resolve@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/require-resolve/-/require-resolve-0.0.2.tgz#bab410ab1aee2f3f55b79317451dd3428764e6f3" + dependencies: + x-path "^0.0.2" + require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" @@ -2680,6 +2708,12 @@ write@^0.2.1: dependencies: mkdirp "^0.5.1" +x-path@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/x-path/-/x-path-0.0.2.tgz#294d076bb97a7706cc070bbb2a6fd8c54df67b12" + dependencies: + path-extra "^1.0.2" + xtend@~4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"