Skip to content

Commit cedafc2

Browse files
committed
basic d2
1 parent 4babd52 commit cedafc2

File tree

22 files changed

+1003
-139
lines changed

22 files changed

+1003
-139
lines changed

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ I have implemented core packages and added some examples. However, I still need
2929

3030
### Diagrams
3131

32-
| | rehype | Astro |
33-
| -------- | --------------------------------------------------- | ----- |
34-
| Graphviz | [@beoe/rehype-graphviz](/packages/rehype-graphviz/) | |
35-
| Mermaid | [@beoe/rehype-mermaid](/packages/rehype-mermaid/) | |
36-
| Gnuplot | [@beoe/rehype-gnuplot](/packages/rehype-gnuplot/) | |
37-
| Vizdom | [@beoe/rehype-vizdom](/packages/rehype-vizdom/) | |
38-
| D2 | | |
39-
| Penrose | | |
40-
| ... | | |
32+
| | rehype | Astro |
33+
| -------- | ----------------------------------------------------------- | ----- |
34+
| Graphviz | [@beoe/rehype-graphviz](/packages/rehype-graphviz/) | |
35+
| Mermaid | [@beoe/rehype-mermaid](/packages/rehype-mermaid/) | |
36+
| Gnuplot | [@beoe/rehype-gnuplot](/packages/rehype-gnuplot/) | |
37+
| Vizdom | [@beoe/rehype-vizdom](/packages/rehype-vizdom/) | |
38+
| D2 | [@beoe/rehype-d2](/packages/rehype-d2/) (not published yet) | |
39+
| Penrose | | |
40+
| ... | | |
4141

4242
Ideas for other diagrams: [Text to Diagram](https://stereobooster.com/posts/text-to-diagram/).
4343

experiments/rehype-d2/src/index.ts

-98
This file was deleted.

experiments/rehype-d2/test/fixtures/a-inline.html

-1
This file was deleted.

experiments/rehype-d2/test/fixtures/a.md

-3
This file was deleted.

experiments/rehype-d2/test/fixtures/a1-datauri.html

-1
This file was deleted.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
},
1919
"scripts": {
2020
"test": "vitest",
21-
"build": "turbo run build --concurrency 13",
22-
"dev": "turbo run dev --concurrency 13",
23-
"clean": "turbo run clean --concurrency 13",
24-
"tsc": "turbo run tsc --concurrency 13"
21+
"build": "turbo run build --concurrency 14",
22+
"dev": "turbo run dev --concurrency 14",
23+
"clean": "turbo run clean --concurrency 14",
24+
"tsc": "turbo run tsc --concurrency 14"
2525
},
2626
"packageManager": "pnpm@9.2.0"
2727
}

packages/demo/astro.config.mjs

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { getCache } from "@beoe/cache";
99
import { rehypeGraphviz } from "@beoe/rehype-graphviz";
1010
import { rehypeGnuplot } from "@beoe/rehype-gnuplot";
1111
import { rehypeVizdom } from "@beoe/rehype-vizdom";
12+
import { rehypeD2 } from "@beoe/rehype-d2";
1213

1314
const cache = await getCache();
1415
// requerd for correct displaying mobile warning
@@ -43,6 +44,7 @@ export default defineConfig({
4344
// { cache, class: className, strategy: "img-class-dark-mode" },
4445
// ],
4546
[rehypeGnuplot, { cache, class: className }],
47+
[rehypeD2, {}], //, { cache, class: className }],
4648
],
4749
},
4850
vite: {

packages/demo/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"@beoe/astro-graphviz": "workspace:*",
1616
"@beoe/cache": "workspace:*",
1717
"@beoe/pan-zoom": "workspace:*",
18+
"@beoe/rehype-d2": "workspace:*",
1819
"@beoe/rehype-gnuplot": "workspace:*",
1920
"@beoe/rehype-graphviz": "workspace:*",
2021
"@beoe/rehype-vizdom": "workspace:*",

0 commit comments

Comments
 (0)