Remove the AddPost command.
I will be putting this back in later but having the skeleton sitting there unused has no value at this time.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
mod runner;
|
||||
|
||||
pub(crate) use runner::build_site;
|
||||
|
||||
7
src/command/build/runner.rs
Normal file
7
src/command/build/runner.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
use crate::cli::parameters::BuildArgs;
|
||||
use crate::config::Config;
|
||||
|
||||
pub(crate) async fn build_site(args: BuildArgs) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let _config = Config::load_from_file(args.config).await?;
|
||||
Ok(())
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::cli::parameters::InitArgs;
|
||||
use crate::config::Config;
|
||||
|
||||
pub(crate) async fn init_writer_folder(args: &InitArgs) -> Result<(), Box<dyn std::error::Error>> {
|
||||
pub(crate) async fn init_writer_folder(args: InitArgs) -> Result<(), Box<dyn std::error::Error>> {
|
||||
if args.path.exists() && !args.path.is_dir() {
|
||||
return Err("The supplied path exists but is not a directory. Aborting.".into());
|
||||
}
|
||||
@@ -16,7 +16,7 @@ pub(crate) async fn init_writer_folder(args: &InitArgs) -> Result<(), Box<dyn st
|
||||
return Err("The directory is not empty. Aborting.".into());
|
||||
}
|
||||
|
||||
let new_config = Config::new(&args.path)?;
|
||||
let new_config = Config::new(args.path)?;
|
||||
new_config.write_to_disk().await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user