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/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kittybox-rs/src/lib.rs') diff --git a/kittybox-rs/src/lib.rs b/kittybox-rs/src/lib.rs index 7084601..97bb608 100644 --- a/kittybox-rs/src/lib.rs +++ b/kittybox-rs/src/lib.rs @@ -55,13 +55,13 @@ pub mod companion { let mut map = HashMap::new(); macro_rules! register_resource { - ($map:ident, $prefix:literal, ($filename:literal, $mime:literal)) => {{ + ($map:ident, $prefix:expr, ($filename:literal, $mime:literal)) => {{ $map.insert($filename, Resource { data: include_bytes!(concat!($prefix, $filename)), mime: $mime }) }}; - ($map:ident, $prefix:literal, ($filename:literal, $mime:literal), $( ($f:literal, $m:literal) ),+) => {{ + ($map:ident, $prefix:expr, ($filename:literal, $mime:literal), $( ($f:literal, $m:literal) ),+) => {{ register_resource!($map, $prefix, ($filename, $mime)); register_resource!($map, $prefix, $(($f, $m)),+); }}; @@ -69,7 +69,7 @@ pub mod companion { register_resource! { map, - "../companion-lite/", + concat!(env!("OUT_DIR"), "/", "companion", "/"), ("index.html", "text/html; charset=\"utf-8\""), ("main.js", "text/javascript"), ("micropub_api.js", "text/javascript"), -- cgit 1.4.1