Skip to main content

oag_node_client/emitters/
mod.rs

1pub mod bundled;
2pub mod client;
3pub mod index;
4pub mod scaffold;
5pub mod split;
6pub mod sse;
7pub mod tests;
8pub mod types;
9
10/// Build a file path under the configured source directory.
11///
12/// - `source_dir = "src"` → `"src/index.ts"`
13/// - `source_dir = ""` → `"index.ts"`
14/// - `source_dir = "lib"` → `"lib/index.ts"`
15pub fn source_path(source_dir: &str, file: &str) -> String {
16    if source_dir.is_empty() {
17        file.to_string()
18    } else {
19        format!("{source_dir}/{file}")
20    }
21}