Skip to content

Commit

Permalink
basic d2
Browse files Browse the repository at this point in the history
  • Loading branch information
stereobooster committed Nov 19, 2024
1 parent 4babd52 commit cedafc2
Show file tree
Hide file tree
Showing 22 changed files with 1,003 additions and 139 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ I have implemented core packages and added some examples. However, I still need

### Diagrams

| | rehype | Astro |
| -------- | --------------------------------------------------- | ----- |
| Graphviz | [@beoe/rehype-graphviz](/packages/rehype-graphviz/) | |
| Mermaid | [@beoe/rehype-mermaid](/packages/rehype-mermaid/) | |
| Gnuplot | [@beoe/rehype-gnuplot](/packages/rehype-gnuplot/) | |
| Vizdom | [@beoe/rehype-vizdom](/packages/rehype-vizdom/) | |
| D2 | | |
| Penrose | | |
| ... | | |
| | rehype | Astro |
| -------- | ----------------------------------------------------------- | ----- |
| Graphviz | [@beoe/rehype-graphviz](/packages/rehype-graphviz/) | |
| Mermaid | [@beoe/rehype-mermaid](/packages/rehype-mermaid/) | |
| Gnuplot | [@beoe/rehype-gnuplot](/packages/rehype-gnuplot/) | |
| Vizdom | [@beoe/rehype-vizdom](/packages/rehype-vizdom/) | |
| D2 | [@beoe/rehype-d2](/packages/rehype-d2/) (not published yet) | |
| Penrose | | |
| ... | | |

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

Expand Down
98 changes: 0 additions & 98 deletions experiments/rehype-d2/src/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion experiments/rehype-d2/test/fixtures/a-inline.html

This file was deleted.

3 changes: 0 additions & 3 deletions experiments/rehype-d2/test/fixtures/a.md

This file was deleted.

1 change: 0 additions & 1 deletion experiments/rehype-d2/test/fixtures/a1-datauri.html

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
},
"scripts": {
"test": "vitest",
"build": "turbo run build --concurrency 13",
"dev": "turbo run dev --concurrency 13",
"clean": "turbo run clean --concurrency 13",
"tsc": "turbo run tsc --concurrency 13"
"build": "turbo run build --concurrency 14",
"dev": "turbo run dev --concurrency 14",
"clean": "turbo run clean --concurrency 14",
"tsc": "turbo run tsc --concurrency 14"
},
"packageManager": "[email protected]"
}
2 changes: 2 additions & 0 deletions packages/demo/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { getCache } from "@beoe/cache";
import { rehypeGraphviz } from "@beoe/rehype-graphviz";
import { rehypeGnuplot } from "@beoe/rehype-gnuplot";
import { rehypeVizdom } from "@beoe/rehype-vizdom";
import { rehypeD2 } from "@beoe/rehype-d2";

const cache = await getCache();
// requerd for correct displaying mobile warning
Expand Down Expand Up @@ -43,6 +44,7 @@ export default defineConfig({
// { cache, class: className, strategy: "img-class-dark-mode" },
// ],
[rehypeGnuplot, { cache, class: className }],
[rehypeD2, {}], //, { cache, class: className }],
],
},
vite: {
Expand Down
1 change: 1 addition & 0 deletions packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@beoe/astro-graphviz": "workspace:*",
"@beoe/cache": "workspace:*",
"@beoe/pan-zoom": "workspace:*",
"@beoe/rehype-d2": "workspace:*",
"@beoe/rehype-gnuplot": "workspace:*",
"@beoe/rehype-graphviz": "workspace:*",
"@beoe/rehype-vizdom": "workspace:*",
Expand Down
Loading

0 comments on commit cedafc2

Please sign in to comment.