1use clap::Parser;
3use forc_pkg::source::IPFSNode;
4
5forc_util::cli_examples! {
6 crate::cli::Command {
7 [ Build the docs for a project in the current path => "forc doc"]
8 [ Build the docs for a project in the current path and open it in the browser => "forc doc --open" ]
9 [ Build the docs for a project located in another path => "forc doc --path {path}" ]
10 [ Build the docs for the current project exporting private types => "forc doc --document-private-items" ]
11 [ Build the docs offline without downloading any dependencies => "forc doc --offline" ]
12 }
13}
14
15#[derive(Debug, Parser, Default)]
17#[clap(
18 name = "forc-doc",
19 after_help = help(),
20 version
21)]
22pub struct Command {
23 #[clap(short, long, alias = "manifest-path")]
27 pub path: Option<String>,
28 #[clap(long)]
30 pub document_private_items: bool,
31 #[clap(long)]
33 pub open: bool,
34 #[clap(long = "offline")]
37 pub offline: bool,
38 #[clap(long)]
41 pub locked: bool,
42 #[clap(long)]
44 pub no_deps: bool,
45 #[clap(long)]
49 pub ipfs_node: Option<IPFSNode>,
50 #[cfg(test)]
51 pub(crate) doc_path: Option<String>,
52 #[clap(flatten)]
53 pub experimental: sway_features::CliFields,
54 #[clap(long = "silent", short = 's')]
56 pub silent: bool,
57}