pub mod error;
pub mod packs;
pub mod templates;
pub mod utils;
use error::Result;
use std::path::Path;
#[derive(Debug, Clone)]
pub struct Config {
pub quality: bool,
pub hooks: bool,
pub arch: Option<String>,
pub force: bool,
pub yes: bool,
}
pub fn apply_packs(config: &Config, project_path: &Path) -> Result<()> {
println!("🚀 Setting up project at: {}", project_path.display());
println!();
if config.quality {
packs::quality::apply(project_path, config.force)?;
}
if config.hooks {
packs::hooks::apply(project_path, config.force)?;
}
if let Some(arch_type) = &config.arch {
packs::architecture::apply(project_path, arch_type, config.force)?;
}
println!();
println!("✅ Setup complete!");
Ok(())
}