-
Notifications
You must be signed in to change notification settings - Fork 37
Dynamic mapping / rasterization bug #16
Comments
After some fiddling, the only syntax that seems to work for me is: build: {
files: [{
cwd: 'src/',
src: ['assets/ico/**/*.svg'],
dest: 'build/',
expand: false
}]
} So I still don't know what exactly was going wrong, but hope this is of help! |
Thanks @ismay, I'm glad you got it working :) Recent changes had broke the old config options and I'm a bit behind on my Grunt files knowledge to understand exactly how it should work. I believe it's now correct though! |
Me too :)! I think I made a couple of mistakes in the config at first, but the final config should have worked with
Is it this commit that should have fixed the dynamic mapping: 7297635? Because I can take a look and see if everything's working as expected now, if you'd like. |
Something happened between the last version and this one. I had been using the following config, which worked just fine:
but now, I've had to modify it to this to make it work:
I am happy that I can still make it work, but it doesn't seem to follow the same structure as some of my other grunt tasks, and since it worked fine previously, something doesn't feel right here. Are there any plans to look into this, or do I change the config to what's working and move on? Thanks! |
This doesn't seem to work anymore. If I do try this, the rasterization process just hangs up at 0, and nothing happens. |
I'm using svg2png to render fallback png's and am encountering several bugs: when I run
grunt svg2png
with this config:it hangs at 0% when rasterizing.
Adding expand
When I add
expand:true
the rasterization works, but folder structure it outputs is wrong. Withsrc/assets/ico/test.svg
the result isbuild/test.png/src/assets/ico/test.png
. So it outputs the filename as a folder first and then messes up the folder structure (I believe it should bebuild/assets/ico/test.png
). When I fiddle around with thecwd
andsrc
it keeps outputting the filename as a folder.Removing ext
When I remove
ext:'png'
the folder structure becomes:build/test.svg/src/assets/ico/test.png
.Summary
expand:true
Any idea what's going wrong? To me it seems like there's something wrong with svg2png's implementation of grunt's dynamic mapping syntax, since similar syntax seems to work just fine with other plugins (copy for example).
The text was updated successfully, but these errors were encountered: