Feat(core) rebuild on dist dir change fix: #285 (#284)

* update .gitignore

* remove cargo.lock

* line to rebuild on a change to the dist folder.

* add expect
This commit is contained in:
Tensor-Programming
2020-01-07 06:13:21 -05:00
committed by GitHub
parent 7ac442e3f6
commit 9625c0fdf6

View File

@@ -4,13 +4,15 @@ extern crate tauri_includedir_codegen;
pub fn main() {
#[cfg(not(feature = "dev-server"))]
{
println!(
"cargo:rerun-if-changed={}",
std::env::var("TAURI_DIST_DIR").expect("Unable to read dist directory")
);
match std::env::var("TAURI_DIST_DIR") {
Ok(dist_path) => {
let inlined_assets = match std::env::var("TAURI_INLINED_ASSETS") {
Ok(assets) => {
assets.split("|").map(|s| s.to_string()).collect()
}
Err(_) => Vec::new()
Ok(assets) => assets.split("|").map(|s| s.to_string()).collect(),
Err(_) => Vec::new(),
};
// include assets
tauri_includedir_codegen::start("ASSETS")