dbushell / grunt-svg2png

Grunt plugin to rasterize SVG to PNG images using PhantomJS
MIT License
76 stars 37 forks source link

Task Hangs #35

Open Exagram opened 8 years ago

Exagram commented 8 years ago

Hey, can anybody chime in on why this library stalls?

Environment:

OS: Windows 7 64bit node (64bit): v4.3.0 grunt-cli (global): 0.1.13 grunt: 0.4.5 grunt-svg-to-png: 0.2.5 (I even tried 0.2.7)

cat GruntFile.js: ... svg2png: { all: { files: [ { src: ['images/icons/svg/*.svg'], dest: 'images/icons/png/' } ] } } ...

Additionally, I tried replacing the GruntFile line with: { cwd: '.', src: ['images/icons/svg/*.svg'], dest: 'images/icons/png/' }, but this failed too.

Console log: Rasterizing SVG to PNG (206 files)... ...............................................................................................................................................................................................................

6.2s

JREAM commented 7 years ago

I think we need pn/fs to create promises and limit this all at once as it can't handle over 5 SVG's it seems.