cream-js 0.1.0

A lightweight compiler for modern web applications.
1
2
3
4
5
6
7
8
9
pub fn build_path(path: &str) -> String {
    let key = if path == "error" {path} else {&path.replace("/", "_")};
    format!("./build/{key}.js")
}

pub fn translate_import_src_to_build(path: &str) -> String {
    let key = if path == "error" {path} else {&path.replace("/", "_")};
    format!("./{key}.js")
}