Skip to content

Commit

Permalink
vizdom doesn't wotk in Astro either
Browse files Browse the repository at this point in the history
  • Loading branch information
stereobooster committed Oct 13, 2024
1 parent 6a17604 commit d4a1b5f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 8 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
},
"scripts": {
"test": "vitest",
"build": "turbo run build --concurrency 12",
"dev": "turbo run dev --concurrency 12",
"clean": "turbo run clean --concurrency 12",
"tsc": "turbo run tsc --concurrency 12"
"build": "turbo run build --concurrency 13",
"dev": "turbo run dev --concurrency 13",
"clean": "turbo run clean --concurrency 13",
"tsc": "turbo run tsc --concurrency 13"
},
"packageManager": "[email protected]"
}
15 changes: 13 additions & 2 deletions packages/demo/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ import { rehypeGraphviz } from "@beoe/rehype-graphviz";
import { rehypeMermaid } from "@beoe/rehype-mermaid";
import { rehypeGnuplot } from "@beoe/rehype-gnuplot";

// import wasm from "vite-plugin-wasm";
// import topLevelAwait from "vite-plugin-top-level-await";
// import { rehypeVizdom } from "@beoe/rehype-vizdom";

const cache = await getCache();
// requerd for correct displaying mobile warning
const className = "not-content"
const className = "not-content";

// https://astro.build/config
export default defineConfig({
Expand Down Expand Up @@ -39,9 +43,16 @@ export default defineConfig({
{ cache, class: className, strategy: "img-class-dark-mode" },
],
[rehypeGnuplot, { cache, class: className }],
// [rehypeViszdom, { cache, class: className }],
],
},
vite: {
plugins: [qrcode()],
plugins: [
qrcode(),
// wasm(), topLevelAwait()
],
optimizeDeps: {
exclude: ["@vizdom/vizdom-ts-esm"],
},
},
});
3 changes: 3 additions & 0 deletions packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"@beoe/rehype-gnuplot": "workspace:*",
"@beoe/rehype-graphviz": "workspace:*",
"@beoe/rehype-mermaid": "workspace:*",
"@beoe/rehype-vizdom": "workspace:*",
"vite-plugin-top-level-await": "^1.4.4",
"vite-plugin-wasm": "^3.3.0",
"astro": "4.16.2",
"sharp": "^0.33.5",
"typescript": "^5.6.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/rehype-vizdom/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@beoe/rehype-vizdom",
"type": "module",
"version": "0.0.2",
"version": "0.0.1",
"description": "rehype vizdom plugin",
"keywords": [
"rehype",
Expand Down
2 changes: 1 addition & 1 deletion packages/rehype-vizdom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const rehypeVizdom: Plugin<[RehypeVizdomConfig?], Root> = (
return rehypeCodeHook({
...options,
salt,
language: "dot",
language: "vizdom",
code: ({ code }) =>
getSvg(code).then((str) =>
processVizdomSvg(str, options.class, options.svgo)
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d4a1b5f

Please sign in to comment.