yog-cli 0.52.0

Yog build tool — `yog build` compiles a mod and packages it as .yog.
1
2
3
4
5
6
7
8
9
10
11
12
13
//! `yog ui gen [file.yui ...]`: screens' code generated (no files: every
//! `src/**/*.yui`).

pub(super) const WORDS: &[&str] = &["ui"];
const GEN: &str = "gen";
const USAGE: &str = "usage: yog ui gen [file.yui ...]  (no files: every src/**/*.yui)";

pub(super) fn run(rest: &[String]) -> Result<(), String> {
    match rest.first().map(String::as_str) {
        Some(GEN) => crate::cli::pipeline::steps::ui_gen(rest.get(1..).unwrap_or_default()),
        _ => Err(USAGE.into()),
    }
}