tscircuit / circuit-to-png

Convert tscircuit json into a PNG
0 stars 0 forks source link

API improvements in soupToPng #5

Closed imrishabh18 closed 3 months ago

imrishabh18 commented 3 months ago

This is good but the API is bad (can't specify output, requires node when it doesn't need to), instead of outputting to a file soupToPng should return a buffer. Also I would recommend naming it circuitToPng just for parity with the library name.

You should be able to throw in a bun test as a smoke test that outputs to a file for inspection. This can all be in a future PR (feel free to create an issue from this comment using the three dot menu)

Originally posted by @seveibar in https://github.com/tscircuit/circuit-to-png/pull/4#pullrequestreview-2200268687