From b7d4e5c4686bc8aac41d832567190002542a1743 Mon Sep 17 00:00:00 2001 From: Vika Date: Thu, 29 Sep 2022 22:39:28 +0300 Subject: companion-lite: port to TypeScript --- kittybox-rs/src/frontend/mod.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'kittybox-rs/src/frontend') diff --git a/kittybox-rs/src/frontend/mod.rs b/kittybox-rs/src/frontend/mod.rs index 43a2824..6b4bdae 100644 --- a/kittybox-rs/src/frontend/mod.rs +++ b/kittybox-rs/src/frontend/mod.rs @@ -268,9 +268,18 @@ pub async fn catchall( } const STYLE_CSS: &[u8] = include_bytes!("./style.css"); -const ONBOARDING_JS: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/onboarding.js")); +// XXX const path handling is ugly, and concat!() doesn't take +// constants, only literals... how annoying! +// +// This might break compiling on inferior operating systems that use +// backslashes as their path separator +const ONBOARDING_JS: &[u8] = include_bytes!(concat!( + env!("OUT_DIR"), "/", "kittybox_js", "/", "onboarding.js" +)); const ONBOARDING_CSS: &[u8] = include_bytes!("./onboarding.css"); -const INDIEAUTH_JS: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/indieauth.js")); +const INDIEAUTH_JS: &[u8] = include_bytes!(concat!( + env!("OUT_DIR"), "/", "kittybox_js", "/", "indieauth.js" +)); const MIME_JS: &str = "application/javascript"; const MIME_CSS: &str = "text/css"; -- cgit 1.4.1