diff options
author | metamuffin <metamuffin@disroot.org> | 2023-10-01 10:49:56 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-10-01 10:49:56 +0200 |
commit | 0f7d759a60974caf698f3a2a8c02179916be4def (patch) | |
tree | 9568b4bda05d79202a79065c1f361bf59c2a5cf5 /server/build.rs | |
parent | 48afcd0d86b3b20da0fc8e289fecdda59eb290fe (diff) | |
download | jellything-0f7d759a60974caf698f3a2a8c02179916be4def.tar jellything-0f7d759a60974caf698f3a2a8c02179916be4def.tar.bz2 jellything-0f7d759a60974caf698f3a2a8c02179916be4def.tar.zst |
fix path + write a nice message when building :)
Diffstat (limited to 'server/build.rs')
-rw-r--r-- | server/build.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/build.rs b/server/build.rs index fb31a66..9c8be12 100644 --- a/server/build.rs +++ b/server/build.rs @@ -3,19 +3,19 @@ use std::process::{Command, Stdio}; fn main() { println!("cargo:rerun-if-changed=build.rs"); - for file in glob::glob("../web/scripts/**/*.ts") + for file in glob::glob("../web/script/**/*.ts") .unwrap() .map(Result::unwrap) { println!("cargo:rerun-if-changed={}", file.to_str().unwrap()); } + let outpath = std::env::var("OUT_DIR").unwrap(); + // this is great :))) + println!("cargo:warning=\r\x1b[32m\x1b[1m Bundle\x1b[0m writing bundle.js ({outpath})"); let mut proc = Command::new("esbuild") .arg("../web/script/main.ts") .arg("--bundle") - .arg(format!( - "--outfile={}/bundle.js", - std::env::var("OUT_DIR").unwrap() - )) + .arg(format!("--outfile={outpath}/bundle.js")) .arg("--target=esnext") .arg("--sourcemap") .arg("--sourcemap") |