wapm_cli/commands/
init.rs1use crate::init;
2use structopt::StructOpt;
3
4#[derive(StructOpt, Debug)]
5pub struct InitOpt {
6 #[structopt(long = "force-yes", short = "y")]
8 force_yes: bool,
9 project_name: Option<String>,
11}
12
13pub fn init(opt: InitOpt) -> anyhow::Result<()> {
14 let current_directory = crate::config::Config::get_current_dir()?;
15 init::init(current_directory, opt.force_yes, opt.project_name)
16}
17
18#[cfg(feature = "integration_tests")]
19impl InitOpt {
20 pub fn new(force_yes: bool) -> Self {
21 InitOpt {
22 force_yes,
23 project_name: None,
24 }
25 }
26}