It does share a large portion of logic with the actual opening of bundles. But trying to combine everything would only make things more complex.
22 lines
784 B
Rust
22 lines
784 B
Rust
use std::sync::Arc;
|
|
|
|
use clap::{Arg, ArgMatches, Command};
|
|
use color_eyre::eyre::Result;
|
|
use tokio::sync::RwLock;
|
|
|
|
pub(crate) fn command_definition() -> Command {
|
|
Command::new("new")
|
|
.about("Create a new project")
|
|
.arg(Arg::new("name").help(
|
|
"The name of the new project. Will default to the name of the project's directory",
|
|
))
|
|
.arg(Arg::new("directory").required(true).help(
|
|
"The directory where to initialize the new project. This directory must be empty\
|
|
or must not exist. If `.` is given, the current directory will be used.",
|
|
))
|
|
}
|
|
|
|
#[tracing::instrument(skip_all)]
|
|
pub(crate) async fn run(_ctx: Arc<RwLock<dtmt::Context>>, _matches: &ArgMatches) -> Result<()> {
|
|
unimplemented!()
|
|
}
|