Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/codegen/bake-codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function css(file: string, is_development: boolean): string {
stdio: ["ignore", "pipe", "pipe"],
});
if (!success) throw new Error(stderr.toString("utf-8"));
return stdout.toString("utf-8");
return stdout.toString("utf-8").trimEnd();
}

async function run() {
Expand All @@ -53,7 +53,11 @@ async function run() {
side: JSON.stringify(side),
IS_ERROR_RUNTIME: String(file === "error"),
IS_BUN_DEVELOPMENT: String(!!debug),
OVERLAY_CSS: css("../runtime/bake/client/overlay.css", !!debug),
// `define` values must be JS expressions; pass the CSS as an
// explicit string literal instead of relying on the define
// parser's auto-quote recovery for raw non-JSON values. The
// consumer is `declare const OVERLAY_CSS: string`.
OVERLAY_CSS: JSON.stringify(css("../runtime/bake/client/overlay.css", !!debug)),
},
minify: {
syntax: !debug,
Expand Down
5 changes: 5 additions & 0 deletions src/runtime/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ pub mod crypto;
// codegen (`generated_js2native.rs`) addresses this by its file-stem name.
pub use crypto as node_crypto_binding;

// macOS-only: the FSEvents/CoreFoundation backend for `fs.watch`. Gating the
// whole module (rather than `#[allow(dead_code)]` on its entry points) keeps
// the other platforms from compiling CF-specific code at all.
#[cfg(target_os = "macos")]
#[path = "node/fs_events.rs"]
pub mod fs_events;
#[cfg(target_os = "macos")]
pub use fs_events as FSEvents;

// Sibling modules node_fs.rs imports by `super::` path. Stat/StatFS/time_like
Expand Down
Loading
Loading