Programmatic use?
altano opened this issue · 2 comments
Can I only take screenshots of components I actually create, or is there a way to have programmatic usage of viteshot?
I'd like to try using viteshot to generate screenshots of all my site's entrypoints programmatically. I'll ultimately use these as Open Graph / Twitter cards. Manually creating a MyEntryPointCard.screenshot.jsx
component side-by-side with each MyEntrypoint.jsx
is feasible but I'd rather not.
Thanks for creating this cool library.
Hey @altano, have you considered directly using https://playwright.dev for this?
Yeah I'm working on that approach now. If you are interested in covering that use case with Viteshot I can help craft whatever minimal API gets us there.
For now I'll assume you're focused on the current use case (testing and ad-hoc usage by declaring components) and just close out the issue.
Thanks for making this cool library!