svg-sprite / gulp-svg-sprite

SVG sprites & stacks galore — Gulp plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours
MIT License
648 stars 43 forks source link

xmlDeclaration configuration doesn't have effect #21

Closed rs3d closed 9 years ago

rs3d commented 9 years ago

I'm trying to disable xmlDeclaration for inline svgs, but the output is always the same. I found a simliar issue with the grunt plugin https://github.com/jkphl/grunt-svg-sprite/issues/28

bonkalol commented 9 years ago

I have same issue, i fix this problem with this config file

var svgConfigs = {

    mode: {
        symbol: true
    },

    svg: {
        xmlDeclaration: false,
        doctypeDeclaration: false
    },

    dest: '.'

};

gulp.task('svgSprite', function() {

    return gulp.src(paths.srcPaths.images)
        .pipe(plumber({errorHandler: log}))
        .pipe(svgSprite(svgConfigs))
        .pipe(gulp.dest('dist/img/'));
});
rs3d commented 9 years ago

@bonkalol Thanks, this worked!