xtask/es/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use anyhow::Result;
use clap::{Args, Subcommand};

use self::minifier::MinifierCmd;

mod minifier;

/// Commands for ECMAScript crates.
#[derive(Debug, Args)]
pub(super) struct EsCmd {
    #[clap(subcommand)]
    cmd: Cmd,
}

impl EsCmd {
    pub fn run(self) -> Result<()> {
        match self.cmd {
            Cmd::Minifier(cmd) => cmd.run(),
        }
    }
}

#[derive(Debug, Subcommand)]
enum Cmd {
    Minifier(MinifierCmd),
}