Skip to content

Commit

Permalink
Build npm package with map_view,grpc features (#8225)
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazk authored Nov 26, 2024
1 parent f9f3b3d commit e554f41
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
- scripts/ci/*
- "**/*.html"
- "**/*.js"
- "**/*.mjs"
- "**/*.json"
- "**/*.rs"
- "**/*.toml"
Expand Down
26 changes: 16 additions & 10 deletions rerun_js/web-viewer/build-wasm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,26 @@ const exec = (cmd) => {
};

function buildWebViewer(mode) {
let modeFlags = "";
switch (mode) {
case "debug": {
return exec(
"cargo run -p re_dev_tools -- build-web-viewer --debug --target no-modules-base -o rerun_js/web-viewer",
);
}
case "release": {
return exec(
"cargo run -p re_dev_tools -- build-web-viewer --release -g --target no-modules-base -o rerun_js/web-viewer",
);
}
case "debug":
modeFlags = "--debug";
break;
case "release":
modeFlags = "--release -g";
break;
default:
throw new Error(`Unknown mode: ${mode}`);
}
return exec(
[
"cargo run -p re_dev_tools -- build-web-viewer",
modeFlags,
"--target no-modules-base",
"--features map_view,grpc",
"-o rerun_js/web-viewer",
].join(" "),
);
}

function re_viewer_js() {
Expand Down

0 comments on commit e554f41

Please sign in to comment.