w0rm / gulp-svgstore

Combine svg files into one with symbol elements
https://www.npmjs.com/package/gulp-svgstore
645 stars 33 forks source link

Does Gulp svgstore allow for options like Grunt svgstore? #78

Closed bratliff closed 7 years ago

bratliff commented 7 years ago

I've been going through the implementation options for gulp svgstore, looking for ways to include task parameters as found in grunt svgstore. I'm not sure if they're not available or if I'm just not implementing them correctly.

Is there a way to include things like preserveAspectRatio and viewbox in the gulp svgstore process like the following?

Grunt.initConfig({

        svgstore: {
            options: {
                includedemo: true,
                cleanup: true,
                // This will prefix each ID
                prefix : 'svg-',
                // will add and overide the the default
                // xmlns="http://www.w3.org/2000/svg"
                // attribute to the resulting SVG
                svg: {
                viewBox : '0 0 100 100',
                xmlns: 'http://www.w3.org/2000/svg'
                },
                symbol: {
                preserveAspectRatio: 'xMidYMin meet'
            }
        },
            default : {
                files: {
                'public/img/gleam-svg-icons.svg': ['src/svg/gleam/*.svg'],
                },
            },
        },
)};

I tried to include the options in a similar way for gulp svgstore. The operation ran, but none of the specified options were included in the process. Please help!

w0rm commented 7 years ago

There are no options, but you can check "Transform svg sources or combined svg" section of the readme.