Closed CrowdHailer closed 10 years ago
I think you should use it like this:
var svgs = gulp.src(['app/resources/*.svg', '!app/resources/lines.svg'])
.pipe(svgmin())
.pipe(svgstore({
inlineSvg: true,
transformSvg: function (svg, cb) {
svg.attr({ style: 'display:none' });
cb(null);
})
}));
@CrowdHailer hi, sorry for the late reply. Yes, @st3phan got it right. Feel free to open PR to correct documentation to make it more clear.
I just wanted to point out that an extra closing bracket got included in @st3phan 's comment. It should be:
transformSvg: function (svg, cb) {
svg.attr({ style: 'display:none' });
cb(null);
} // <-- offending " ) " was here
...just incase someone else gets stumped. Thanks @st3phan for the answer, I was struggling with this one myself.
I want to create inline svg with the display property set to none. I cannot find how the transform functions should be incorporated into gulps pipe structure.
I tried the following but no luck