Skip to content

Commit d4a1b5f

Browse files
committed
vizdom doesn't wotk in Astro either
1 parent 6a17604 commit d4a1b5f

File tree

6 files changed

+31
-8
lines changed

6 files changed

+31
-8
lines changed

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
},
2222
"scripts": {
2323
"test": "vitest",
24-
"build": "turbo run build --concurrency 12",
25-
"dev": "turbo run dev --concurrency 12",
26-
"clean": "turbo run clean --concurrency 12",
27-
"tsc": "turbo run tsc --concurrency 12"
24+
"build": "turbo run build --concurrency 13",
25+
"dev": "turbo run dev --concurrency 13",
26+
"clean": "turbo run clean --concurrency 13",
27+
"tsc": "turbo run tsc --concurrency 13"
2828
},
2929
"packageManager": "pnpm@9.2.0"
3030
}

packages/demo/astro.config.mjs

+13-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ import { rehypeGraphviz } from "@beoe/rehype-graphviz";
77
import { rehypeMermaid } from "@beoe/rehype-mermaid";
88
import { rehypeGnuplot } from "@beoe/rehype-gnuplot";
99

10+
// import wasm from "vite-plugin-wasm";
11+
// import topLevelAwait from "vite-plugin-top-level-await";
12+
// import { rehypeVizdom } from "@beoe/rehype-vizdom";
13+
1014
const cache = await getCache();
1115
// requerd for correct displaying mobile warning
12-
const className = "not-content"
16+
const className = "not-content";
1317

1418
// https://astro.build/config
1519
export default defineConfig({
@@ -39,9 +43,16 @@ export default defineConfig({
3943
{ cache, class: className, strategy: "img-class-dark-mode" },
4044
],
4145
[rehypeGnuplot, { cache, class: className }],
46+
// [rehypeViszdom, { cache, class: className }],
4247
],
4348
},
4449
vite: {
45-
plugins: [qrcode()],
50+
plugins: [
51+
qrcode(),
52+
// wasm(), topLevelAwait()
53+
],
54+
optimizeDeps: {
55+
exclude: ["@vizdom/vizdom-ts-esm"],
56+
},
4657
},
4758
});

packages/demo/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
"@beoe/rehype-gnuplot": "workspace:*",
1919
"@beoe/rehype-graphviz": "workspace:*",
2020
"@beoe/rehype-mermaid": "workspace:*",
21+
"@beoe/rehype-vizdom": "workspace:*",
22+
"vite-plugin-top-level-await": "^1.4.4",
23+
"vite-plugin-wasm": "^3.3.0",
2124
"astro": "4.16.2",
2225
"sharp": "^0.33.5",
2326
"typescript": "^5.6.3",

packages/rehype-vizdom/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@beoe/rehype-vizdom",
33
"type": "module",
4-
"version": "0.0.2",
4+
"version": "0.0.1",
55
"description": "rehype vizdom plugin",
66
"keywords": [
77
"rehype",

packages/rehype-vizdom/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const rehypeVizdom: Plugin<[RehypeVizdomConfig?], Root> = (
8282
return rehypeCodeHook({
8383
...options,
8484
salt,
85-
language: "dot",
85+
language: "vizdom",
8686
code: ({ code }) =>
8787
getSvg(code).then((str) =>
8888
processVizdomSvg(str, options.class, options.svgo)

pnpm-lock.yaml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)