···11mod build;
22mod dev;
33+mod init;
34mod preview;
4556mod logging;
6778use clap::{Parser, Subcommand};
88-use dev::coordinate_dev_env;
99+use dev::start_dev_env;
910use logging::init_logging;
1011use preview::start_preview_web_server;
1112use std::path::{Path, PathBuf};
···20212122#[derive(Subcommand)]
2223enum Commands {
2424+ /// Initialize a new Maudit project
2525+ Init {
2626+ #[clap(long, short)]
2727+ dry_run: bool,
2828+ },
2329 /// Build the project
2430 Build,
2531 /// Run the project in development mode
···3642 // You can check for the existence of subcommands, and if found use their
3743 // matches just as you would the top level cmd
3844 match &cli.command {
4545+ Commands::Init { dry_run } => {
4646+ init::start_new_project(dry_run);
4747+ }
3948 Commands::Build {} => {
4049 build::start_build();
4150 }
···5362 let _ = start_preview_web_server(PathBuf::from("dist")).await;
5463 }
5564 Commands::Dev {} => {
5656- let _ = coordinate_dev_env(".").await;
6565+ let _ = start_dev_env(".").await;
5766 }
5867 }
5968}