enhancementgood first issue
Description
We do not currently supply man pages for Volta. However, it would be relatively straightforward to implement using the clap_mangen crate, since we already use clap for our CLI parser. If someone wants to implement it, it should be a relatively easy first issue.
For a rough idea of how to implement it, you would want to do roughly what we do in src/command/completions.rs:
- Add
clap_mangenas a dependency for that crate. - Add a new
man_pagesmodule as a sibling tocompletionsand the others. - Define a new clap argument with a
pub(crate) struct ManPages. - Implement Volta’s
Commandtrait forManPages, including logging events the same basic wayCompletiontsdoes (so you will also need to add a newActivityKindetc.) for it. - Use the
Manstruct fromclap_mangento generate the man pages from the command (crate::cli::Volta::command()). - Emit the generated roff to the appropriate location. (You will have to see where that is on a per-OS basis!) One note that adds a small bit of complexity here: there is no “default” place to install it on Windows, as far as I know, but we should presumably still support it for someone who wants to read them there.
(Originally posted as a comment by @chriskrycho in https://github.com/volta-cli/volta/issues/1708#issuecomment-1995475302)