From 0607142729e07d870d42842cf8f8d57699757a39 Mon Sep 17 00:00:00 2001 From: Julien Elbaz Date: Sat, 6 Jan 2024 09:50:02 +0100 Subject: [PATCH] chore: prettier cli help output --- src/cli/cli.cr | 83 ++++++++++++++++++++-------------------- src/cli/dlx.cr | 6 +-- src/cli/exec.cr | 2 +- src/cli/init.cr | 2 +- src/cli/install.cr | 40 +++++++++---------- src/cli/run.cr | 4 +- src/cli/store.cr | 14 +++---- src/cli/why.cr | 2 +- src/ext/option_parser.cr | 22 +++++++++++ 9 files changed, 98 insertions(+), 77 deletions(-) diff --git a/src/cli/cli.cr b/src/cli/cli.cr index 260bdca..bad57b6 100644 --- a/src/cli/cli.cr +++ b/src/cli/cli.cr @@ -96,26 +96,6 @@ module Zap separator("Commands") - subSeparator("Install", early_line_break: false) - - command(["install", "i", "add"], "This command installs one or more packages and any packages that they depends on.", "[options] ") do - on_install(parser) - end - - command(["remove", "rm", "uninstall", "un"], "This command removes one or more packages from the node_modules folder, the package.json file and the lockfile.", "[options] ") do - on_install(parser, remove_packages: true) - end - - command(["update", "up", "upgrade"], "This command updates the lockfile to use the newest package versions.", "[options] ") do - on_install(parser, update_packages: true) - end - - command(["why", "y"], "Show information about why a package is installed.", "") do - on_why(parser) - end - - subSeparator("Execute") - command(["dlx", "x"], "Install one or more packages and run a command in a temporary environment.", "[options] ") do on_dlx(parser) end @@ -124,24 +104,34 @@ module Zap on_exec(parser) end - command(["run", "r"], "Run a package's \"script\" command.", "[options]