Add command 'docs' for generating project documentation.
This commit is contained in:
22
crates/cli/src/cmd/docs.rs
Normal file
22
crates/cli/src/cmd/docs.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(clap::Args)]
|
||||
/// Build an Aiken project
|
||||
pub struct Args {
|
||||
/// Path to project
|
||||
#[clap(short, long)]
|
||||
directory: Option<PathBuf>,
|
||||
|
||||
/// Output directory for the documentation
|
||||
#[clap(short = 'o', long)]
|
||||
destination: Option<PathBuf>,
|
||||
}
|
||||
|
||||
pub fn exec(
|
||||
Args {
|
||||
directory,
|
||||
destination,
|
||||
}: Args,
|
||||
) -> miette::Result<()> {
|
||||
crate::with_project(directory, |p| p.docs(destination.clone()))
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
pub mod build;
|
||||
pub mod check;
|
||||
pub mod docs;
|
||||
pub mod error;
|
||||
pub mod fmt;
|
||||
pub mod lsp;
|
||||
|
||||
Reference in New Issue
Block a user