Skip to content

Commit

Permalink
Clean up CLI. Update to 0.2.16
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Jun 27, 2024
1 parent 9f0249d commit a83af8d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/depot/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "depot-js"
version = "0.2.15"
version = "0.2.16"
description = "A Javascript devtool orchestrator"
edition = "2021"
authors = ["Will Crichton <[email protected]>"]
Expand Down
10 changes: 5 additions & 5 deletions crates/depot/src/commands/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ use anyhow::{Context, Result};

use crate::workspace::{package::Package, Command, CoreCommand, PackageCommand};

/// Format source files with prettier
/// Format source files with biome
#[derive(clap::Parser, Debug)]
pub struct FmtArgs {
/// If true, don't write to files and instead fail if they aren't formatted
#[arg(short, long, action)]
pub check: bool,

/// Additional arguments to pass to prettier
/// Additional arguments to pass to biome
#[arg(last = true)]
pub prettier_args: Option<String>,
pub biome_args: Option<String>,
}

#[derive(Debug)]
Expand Down Expand Up @@ -39,8 +39,8 @@ impl CoreCommand for FmtCommand {
#[async_trait::async_trait]
impl PackageCommand for FmtCommand {
async fn run_pkg(&self, pkg: &Package) -> Result<()> {
let extra = match &self.args.prettier_args {
Some(args) => shlex::split(args).context("Failed to parse prettier args")?,
let extra = match &self.args.biome_args {
Some(args) => shlex::split(args).context("Failed to parse biome args")?,
None => Vec::new(),
};

Expand Down
2 changes: 1 addition & 1 deletion crates/depot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub struct CommonArgs {
}

#[derive(clap::Parser)]
#[command(author, version, about, long_about = None)]
#[command(name = "depot", author, version, about, long_about = None)]
struct Args {
#[command(subcommand)]
command: Command,
Expand Down

0 comments on commit a83af8d

Please sign in to comment.