mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 12:01:38 +00:00
Switch from structopt to clap
This commit is contained in:
parent
79c02f2457
commit
c7aeffe586
13 changed files with 107 additions and 98 deletions
|
|
@ -4,9 +4,9 @@ use std::{
|
|||
};
|
||||
|
||||
use anyhow::Context;
|
||||
use clap::Parser;
|
||||
use fs_err::File;
|
||||
use memofs::Vfs;
|
||||
use structopt::StructOpt;
|
||||
use tokio::runtime::Runtime;
|
||||
|
||||
use crate::serve_session::ServeSession;
|
||||
|
|
@ -17,20 +17,20 @@ const UNKNOWN_OUTPUT_KIND_ERR: &str = "Could not detect what kind of file to bui
|
|||
Expected output file to end in .rbxl, .rbxlx, .rbxm, or .rbxmx.";
|
||||
|
||||
/// Generates a model or place file from the Rojo project.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct BuildCommand {
|
||||
/// Path to the project to serve. Defaults to the current directory.
|
||||
#[structopt(default_value = "")]
|
||||
#[clap(default_value = "")]
|
||||
pub project: PathBuf,
|
||||
|
||||
/// Where to output the result.
|
||||
///
|
||||
/// Should end in .rbxm, .rbxl, .rbxmx, or .rbxlx.
|
||||
#[structopt(long, short)]
|
||||
#[clap(long, short)]
|
||||
pub output: PathBuf,
|
||||
|
||||
/// Whether to automatically rebuild when any input files change.
|
||||
#[structopt(long)]
|
||||
#[clap(long)]
|
||||
pub watch: bool,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue