ben-eb / gulp-svgmin

Minify SVG files with gulp.
MIT License
340 stars 34 forks source link

transformsWithOnePath plugin #23

Closed dawidvdh closed 9 years ago

dawidvdh commented 9 years ago

Hi,

the transformsWithOnePath plugin, produces the following error [TypeError: Cannot read property 'value' of undefined]

this is what my task currently looks like:

gulp.src([cfg.paths.assets+"webfont/*.svg"])
            .pipe(svgmin({
                plugins: [{
                    transformsWithOnePath: true
                }]
            }))
            .pipe(gulp.dest(cfg.paths.dest+'fonts/icons/'));

Any Help would be Greatly Appreciated.

ben-eb commented 9 years ago

Do you have a full stack trace?

ben-eb commented 9 years ago

Closing as stale.

breezewish commented 8 years ago

@ben-eb It is because transformsWithOnePath relies on width / height attribute, which might not exist because of the removeDimensions optimization. I cannot find a way to easily add back width / height. Could you re-open this issue?

ben-eb commented 8 years ago

@breeswish The svgo tracker is probably a better place for this issue.

breezewish commented 8 years ago

Thanks, you are right. I wasn't noticed that this is gulp-svgmin :P