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
27
28
29
30
31
32
33
34
35
36
37
38
39
use super::StyleAllCli;
use anyhow::Result;
use clap::Arg;
use clap::ArgAction;
use clap::ArgMatches;
use clap::Command;
use forky_fs::Subcommand;

pub struct StyleCommandAll;

impl Subcommand for StyleCommandAll {
	fn name(&self) -> &'static str { "all" }
	fn about(&self) -> &'static str { "Apply to all style directories." }

	fn append_command(&self, command: Command) -> Command {
		command
			.arg(
				Arg::new("lightning")
					.help("specify directory for lightning to run")
					.required(false)
					.short('l')
					.long("lightning")
					.action(ArgAction::Set),
			)
			.arg(
				Arg::new("package")
					.help("package to find lib.css file in")
					.required(false)
					.short('p')
					.long("package")
					.action(ArgAction::Set),
			)
	}

	fn run(&self, args: &ArgMatches) -> Result<()> {
		let cli: StyleAllCli = args.into();
		cli.run()
	}
}