Skip to content

Commit

Permalink
feat(mermaid): replace mermaid package with container
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhoffmnn committed Oct 10, 2024
1 parent ddb488f commit a28268b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export DOCKER_HOST := "unix://" + env_var("XDG_RUNTIME_DIR") + "/podman/podman.sock"

# List all available commands
@help:
just --list

# Generate mermaid diagrams
@diagrams:
podman run --userns keep-id --user ${UID} --rm -v {{ justfile_directory() }}/src:/app:z -w /app --entrypoint sh minlag/mermaid-cli:11.2.1 -c 'find ./data/mermaid -name "*.mmd" -exec sh -c '"'"'/home/mermaidcli/node_modules/.bin/mmdc -p /puppeteer-config.json -b transparent -i "$1" -o ./assets/mermaid/"$(basename "$1" .mmd).svg"'"'"' _ {} \;'
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"prepare": "husky",
"dev": "astro dev",
"build": "pnpm run mermaid && astro build",
"build": "astro build",
"check": "astro check && tsc --noEmit",
"sync": "astro sync",
"preview": "astro preview",
Expand Down Expand Up @@ -38,7 +38,6 @@
},
"devDependencies": {
"@biomejs/biome": "1.9.3",
"@mermaid-js/mermaid-cli": "^10.9.1",
"@tailwindcss/typography": "^0.5.15",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
Expand Down
Loading

0 comments on commit a28268b

Please sign in to comment.