use clap::Parser;
use forc_pkg::source::IPFSNode;
forc_util::cli_examples! {
crate::cli::Command {
[ Build the docs for a project in the current path => "forc doc"]
[ Build the docs for a project in the current path and open it in the browser => "forc doc --open" ]
[ Build the docs for a project located in another path => "forc doc --manifest-path {path}" ]
[ Build the docs for the current project exporting private types => "forc doc --document-private-items" ]
[ Build the docs offline without downloading any dependency from the network => "forc doc --offline" ]
}
}
#[derive(Debug, Parser, Default)]
#[clap(
name = "forc-doc",
after_help = help(),
version
)]
pub struct Command {
#[clap(long)]
pub manifest_path: Option<String>,
#[clap(long)]
pub document_private_items: bool,
#[clap(long)]
pub open: bool,
#[clap(long = "offline")]
pub offline: bool,
#[clap(long = "silent", short = 's')]
pub silent: bool,
#[clap(long)]
pub locked: bool,
#[clap(long)]
pub no_deps: bool,
#[clap(long)]
pub ipfs_node: Option<IPFSNode>,
#[cfg(test)]
pub(crate) doc_path: Option<String>,
#[clap(long)]
pub no_encoding_v1: bool,
}