added the serve command
This commit is contained in:
@@ -13,5 +13,7 @@ pub enum CommandArg {
|
||||
/// Checks if everything required for docki is installed
|
||||
Health,
|
||||
/// Helper command for installing asciidoctor-reveal-js
|
||||
InstallReveal
|
||||
InstallReveal,
|
||||
/// Starts a Webserver with the live preview of the Documentation
|
||||
Serve
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
pub mod traits;
|
||||
pub mod executions;
|
||||
pub mod build;
|
||||
pub mod health;
|
||||
pub mod install_reveal;
|
||||
mod serve;
|
||||
pub mod serve;
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
use super::traits::Command;
|
||||
|
||||
pub struct Serve;
|
||||
|
||||
impl Command for Serve {
|
||||
fn execute(&self, _args: &std::collections::HashMap<String, String>) -> Result<(), String> {
|
||||
println!("serving the application");
|
||||
return Ok(())
|
||||
}
|
||||
|
||||
fn new() -> Self where Self: Sized {
|
||||
return Self {}
|
||||
}
|
||||
pub fn serve() {
|
||||
println!("serving the developement version")
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ use self::args::{args, structure::CommandArg};
|
||||
use self::commands::build::build;
|
||||
use self::commands::health::health;
|
||||
use self::commands::install_reveal::install_reveal;
|
||||
use self::commands::serve::serve;
|
||||
|
||||
pub struct App;
|
||||
|
||||
@@ -21,7 +22,8 @@ impl App {
|
||||
match args.command {
|
||||
CommandArg::Build => build(),
|
||||
CommandArg::Health => health(),
|
||||
CommandArg::InstallReveal => install_reveal()
|
||||
CommandArg::InstallReveal => install_reveal(),
|
||||
CommandArg::Serve => serve()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user