neocotic / convert-svg

Node.js packages for converting SVG into other formats using headless Chromium
MIT License
198 stars 45 forks source link

Added waitUntil to puppeteer.goto #45

Closed ycmjason closed 6 years ago

ycmjason commented 6 years ago

Thank you so much for making this package! This package is what makes faviator possible! :smile:

SVG may include css styles. To facilitate @import in css, we should wait until the network is idle before doing the screenshot.

ycmjason commented 6 years ago

@neocotic Hope you won't mind, but if you approve the change, can you roll out a patch? I have a bug to fix in another package which is introduced by this.

ycmjason commented 6 years ago

Inspected a little bit and I couldn't fix the test failed. I don't think this is because of my PR tho. I tried cloning master and run the tests and they still fail.

Would want more advice on this. Thank you.

ycmjason commented 6 years ago

never mind 😄 I have implemented my own version.

https://www.npmjs.com/package/@ycm.jason/svg-to-img