added config file for some options

This commit is contained in:
2025-11-10 16:28:55 +01:00
parent 0ae02c8950
commit 88dc0e47b1
9 changed files with 457 additions and 62 deletions

View File

@@ -0,0 +1,46 @@
use super::config::Config;
use clap::{Parser, Subcommand};
#[derive(Parser)]
pub struct Args {
#[command(subcommand)]
pub command: CommandArg,
#[arg(short, long)]
pub docs_dir: Option<String>,
}
#[derive(Subcommand)]
pub enum ShellArg {
Bash,
Fish,
Zsh,
}
#[derive(Subcommand)]
pub enum CommandArg {
/// Builds the documentation into a dist folder
Build {
/// When set to true, docki will download revealjs before building the documentation.
/// Otherwise it will use the cdn for revealjs
#[arg(short, long)]
offline_reveal: bool,
},
/// Checks if everything required for docki is installed
Health,
/// Deprecated: Helper command for installing asciidoctor-reveal-js
InstallReveal,
/// Starts a Webserver with the live preview of the Documentation
Serve {
/// Port for the Live Server
#[arg(short, long)]
port: Option<u16>,
},
/// Generates completions for the desired shell
Completions {
#[command(subcommand)]
shell: ShellArg,
},
}
impl Args {}