pub fn preprocess_crate(lib_root: &Path)
Expand description
Call this once from a build script for a crate that uses embed_js
directly.
Parameters:
lib_root
The path to the crate root rust file, e.g. “src/lib.rs”
Example:
ⓘ
extern crate embed_js_build;
fn main() {
use std::path::PathBuf;
let root = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()).join("src/lib.rs");
embed_js_build::preprocess_crate(&root);
}