Add command 'docs' for generating project documentation.

This commit is contained in:
KtorZ
2022-12-16 18:34:05 +01:00
parent 6da53fd875
commit 1f3f769b53
4 changed files with 39 additions and 1 deletions

View 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()))
}

View File

@@ -1,5 +1,6 @@
pub mod build;
pub mod check;
pub mod docs;
pub mod error;
pub mod fmt;
pub mod lsp;