Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Added cargo subcommand binary #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

theosirian
Copy link

Based on the suggestion from #5, I thought about implementing a cargo subcommand instead, since it would be closer to what it already provides with cargo doc.

I kept it pretty simple, it applies these general options to all the files it renders:

  • "no_css"
  • "no_js"
  • "extra_meta"
  • "extra_header"
  • "extra_footer"

Two new arguments to control whether everything goes into singles files or not:

  • "split_package" to create a new file/directory for every package in the workspace
  • "split_example" to create a new file for every different example

The output file was replaced by the root output directory, under which more directories may be created depending on the previous two arguments. There is also the manifest path argument for cargo.

Three new dependencies were added:

  • cargo_metadata
  • log
  • pretty_env_logger

One API change was made to the extract method.
Clippy suggestions and rustfmt were applied as well, similar to #10.

I'm not really sure what is the correct, standard, best, etc, way to build a cargo subcommand, this was based on a few subcommands I knew and used before.

Signed-off-by: Tiago Nascimento [email protected]

Signed-off-by: Tiago Nascimento <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant