Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add help to the cli app #255

Open
f-person opened this issue Oct 23, 2024 · 0 comments
Open

add help to the cli app #255

f-person opened this issue Oct 23, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@f-person
Copy link

yo! tysm for making & maintaining slang, it's amazing & powerful & i love it!

prelude

i had some translations that exist in secondary locales but not in the main one.
i ran dart run slang analyze, because i already knew about the command, have used it in the past, and remembered it would probably find what i'm looking for.

it successfully did that, however, i then wanted to remove those translations, but didn't know how to make slang remove them (because i knew it can add the missing translations, so there's already some intl source manipulation built-in), so i executed dart run slang analyze --help, hoping to find the right argument i need to add in order to find what i need to do for slang to remove the unused translations.

but instead of providing me help for the analyze subcommand, slang just analyzed the project again. i thought maybe it only has a top-level help, but there was no help, which i found out after executing dart run slang --help.

motivation

why do you want this feature? ex: i'm always frustrated when [...]

in order to find how to remove the unused translations, i switched to firefox, searched !pubdev slang, and went into the slang page & pressed enter 9 times:

but i would've been very happy to find out about dart run slang clean with the very first dart run slang analyze --help execution :), so thought others who use slang might also enjoy the efficiency, hence this feature request! :)

developer experience

how should devs use this new feature? ex: there should be a new parameter called [...]

something just like the build runner's help dx would be amazing. u just add --help to whatever and it tells u! ^_^

build_runner's top level help:

> dart run build_runner --help
Unified interface for running Dart builds.

Usage: build_runner <command> [arguments]

Global options:
-h, --help    Print this usage information.

Available commands:
  build    Performs a single build on the specified targets and then exits.
  clean    Cleans up output from previous builds. Does not clean up --output directories.
  doctor   Check for misconfiguration of the build.
  run      Performs a single build, and executes a Dart script with the given arguments.
  serve    Runs a development server that serves the specified targets and runs builds based on file system updates.
  test     Performs a single build of the test directory only and then runs tests using the compiled assets.
  watch    Builds the specified targets, watching the file system for updates and rebuilding as appropriate.

Run "build_runner help <command>" for more information about a command.

subcommand help:

> dart run build_runner build --help
Performs a single build on the specified targets and then exits.

Usage: build_runner build [arguments] [directories]
-h, --help                          Print this usage information.
-d, --delete-conflicting-outputs    By default, the user will be prompted to delete any files which already exist but were not known to be
                                    generated by this specific build script.

                                    Enabling this option skips the prompt and deletes the files. This should typically be used in continues
                                    integration servers and tests, but not otherwise.
    --low-resources-mode            Reduce the amount of memory consumed by the build process. This will slow down builds but allow them to
                                    progress in resource constrained environments.
-c, --config                        Read `build.<name>.yaml` instead of the default `build.yaml`
    --[no-]track-performance        Enables performance tracking and the /$perf page.
    --log-performance               A directory to write performance logs to, must be in the current package. Implies `--track-performance`.
-o, --output                        A directory to copy the fully built package to. Or a mapping from a top-level directory in the package
                                    to the directory to write a filtered build output to. For example "web:deploy".
-v, --verbose                       Enables verbose logging.
-r, --[no-]release                  Build with release mode defaults for builders.
    --define                        Sets the global `options` config for a builder by key.
    --[no-]symlink                  Symlink files in the output directories, instead of copying.
    --build-filter                  An explicit filter of files to build. Relative paths and `package:` uris are supported, including glob
                                    syntax for paths portions (but not package names).

                                    If multiple filters are applied then outputs matching any filter will be built (they do not need to
                                    match all filters).
    --enable-experiment             A list of dart language experiments to enable.

Run "build_runner help" to see global options.
@f-person f-person added the enhancement New feature or request label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant