w0rm / gulp-svgstore

Combine svg files into one with symbol elements

Home Page:https://www.npmjs.com/package/gulp-svgstore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does Gulp svgstore allow for options like Grunt svgstore?

bratliff opened this issue · comments

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!

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