appstruct-codegen 0.2.0

Deterministic Rust, SQL, OpenAPI, TypeScript, and React generation for AppStruct
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use appstruct_ir::AppIr;

pub(super) fn files(ir: &AppIr) -> Vec<(&'static str, String)> {
    let mut files = Vec::new();
    if ir.auth.enabled {
        files.push((
            "web/src/auth-interaction.test.tsx",
            include_str!("../../templates/web/auth-interaction.test.tsx").to_owned(),
        ));
    }
    if ir.tenant.enabled {
        files.push((
            "web/src/tenant.test.ts",
            include_str!("../../templates/web/tenant.test.ts").to_owned(),
        ));
    }
    files
}