Skip to content

Commit 2f31c48

Browse files
authored
Merge pull request #306 from GordonSmith/REL_BUILD
fix: was defaulting to Debug build
2 parents cbea213 + 7387ac2 commit 2f31c48

File tree

3 files changed

+43
-42
lines changed

3 files changed

+43
-42
lines changed

hw-graphviz.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
</head>
88

99
<body>
10+
<h2 id="placeholder_version"></h2>
1011
<div id="placeholder"></div>
1112
<script type="module">
1213
// Prefer local version (if available) ---
13-
const GraphvizLocal = await import("./dist/index.js").then(m => m.Graphviz).catch(() => undefined);
14-
import { Graphviz as GraphvizExternal } from "https://cdn.jsdelivr.net/npm/@hpcc-js/wasm/dist/index.js";
15-
16-
const Graphviz = GraphvizLocal ?? GraphvizExternal;
14+
const Graphviz = await import("./packages/graphviz/dist/index.js").then(m => m.Graphviz).catch(() => undefined) ??
15+
await import("https://cdn.jsdelivr.net/npm/@hpcc-js/wasm-graphviz/dist/index.js").then(m => m.Graphviz);
1716

1817
const dot = `
1918
digraph G {
@@ -48,7 +47,9 @@
4847
`;
4948

5049
const graphviz = await Graphviz.load();
51-
const div = document.getElementById("placeholder");
50+
let div = document.getElementById("placeholder_version");
51+
div.innerText = `Version: ${graphviz.version()}`;
52+
div = document.getElementById("placeholder");
5253
div.innerHTML = graphviz.layout(dot, "svg", "dot");
5354
</script>
5455

package-lock.json

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/cpp-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ if [ ! -d "./build" ]
55
then
66
cmake -S . -B ./build --preset vcpkg-emscripten-MinSizeRel
77
fi
8-
cmake -S . -B ./build --preset vcpkg-emscripten-Debug
8+
# cmake -S . -B ./build --preset vcpkg-emscripten-Debug
99

1010
cmake --build ./build --parallel

0 commit comments

Comments
 (0)