terrastruct / d2-vscode

VSCode extension for D2 files.
https://d2lang.com
BSD 3-Clause "New" or "Revised" License
240 stars 11 forks source link

Add "Compile D2 to PNG" option #150

Open cachapa opened 1 month ago

cachapa commented 1 month ago

The context menu when right-clicking a file already allows for "Compile D2 to SVG", it would be nice to have an analogous option to compile to PNG, which d2 does support out of the box.

Another option would be to simply have a "Compile" option and show a file dialog where the different formats supported by d2 could be selectable: SVG, PNG, PDF, PPTX, GIF.

https://d2lang.com/tour/exports/