Closed PawelGIX closed 8 years ago
My task:
var svgSprite = require("gulp-svg-sprites");
gulp.task('sprites', function () {
return gulp.src('svg/*.svg')
.pipe(svgSprite({mode: "defs"}))
.pipe(gulp.dest("svg-sprite"));
});
please update to 4.0.2
This is only partially solved the problem. Preview file looks like this: defs.txt
<ul class="icon-boxes">
{#svg}
<li title="{name}">
<div class="icon-box" id="icon-box-{name}">
<svg viewBox="0 0 {width} {height}" class="{#common}{common} {/common}{#selector}{raw}{/selector}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<use xlink:href="#{name}"></use>
</svg>
</div>
<h2>{name}</h2>
<button onclick="showPopover('snippet-{name}')">Show Snippet</button>
<br/>
<button onclick="invertBackground('icon-box-{name}')">Invert Background</button>
<div class="snippet-popover" id="snippet-{name}">
<pre><code><svg viewBox="{viewBox}" class="{#common}{common} {/common}{#selector}{raw}{/selector}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<use xlink:href="#svg-arr-black-reversed"></use>
</svg></code></pre>
<button onclick="hidePopover()">Close</button>
</div>
</li>
{/svg}
</ul>
This happen without errors in console.