Combination of Phantom and not specifying algorithm causes 0 size png to be generated
#47 ouverte le 11 nov. 2013
Métriques du dépôt
- Stars
- (1 141 stars)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
Firstly, thanks for an awesome grunt plugin. I had some issues today using this for the first time on Windows with Phantom. I was seeing that the css was generated fine, but the png had zero file size. My task looked like:
classes_sp : {
src : '<%= css_src_path %>/classes/**/*.png',
destImg : '<%= css_build_path %>/classes-sprite.png',
destCSS : '<%= css_build_path %>/classes-sprite.css',
'engine' : 'phantomjs'
},
By adding in the algorithm as binary-tree, rather than using the default, all of a sudden png files and css generated correctly. Admittedly the sprites were fairly large one 5Mb and one 70Mb (152 images) - which is ridiculous but I was just trying to get something working.
I think if it is related to the size an error stating that files were too large to sprite with the algorithm would be cool - a silent fail makes me a bit nervous to use this in production.