prest-build 0.2.0

Progressive RESTful framework build utils
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// DUPLICATED FROM ../lib.rs DUE TO AN ISSUE WITH RUST-ANALYZER FAILING TO RESOLVE #[path...] ATTRIBUTE
pub fn is_pwa() -> bool {
    #[cfg(target_arch = "wasm32")]
    return true;
    #[cfg(not(target_arch = "wasm32"))]
    {
        #[cfg(debug_assertions)]
        return std::env::var("PWA").map_or(false, |v| v == "debug");
        #[cfg(not(debug_assertions))]
        return std::env::var("PWA").map_or(true, |v| v == "release");
    }
}