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

Blank visual output

reintroducing opened this issue · comments

I'm trying out the plugin by just using the "times" icon from FontAwesome. My task is as follows (more or less, removed variables for paths):

import gulp from 'gulp';
import svgstore from 'gulp-svgstore';

gulp.task('icons', () => {
    return gulp.src('icons/times.svg')
        .pipe(svgstore())
        .pipe(gulp.dest('icons/output'));
});

The output SVG file is as follows:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg"><symbol id="times" viewBox="0 0 1792 1792"><path d="M1490 1322q0 40-28 68l-136 136q-28 28-68 28t-68-28l-294-294-294 294q-28 28-68 28t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 294 294-294q28-28 68-28t68 28l136 136q28 28 28 68t-28 68l-294 294 294 294q28 28 28 68z"/></symbol></svg>

Great. I now load it in Illustrator (or in a page, whatever) and I see nothing. There is nothing in the SVG file visually, try to select all in Illustrator and it selects nothing.

What am I missing in this equation?

As a follow up here I ran the task with the circle icon from the test directory in this repo and got the same thing, nothing visual. Can anyone help me out and see what I'm doing wrong? I'd love to use SVG icons in my project but this is obviously gating that. Appreciate any help anyone can offer.

wow, i am a complete idiot and misunderstood how this was all supposed to work. there is no visual output in the svg, it's just the definitions which then get injected into my files and I can color them visually with classes. yep, everything working fine now, nothing to see here.

apologize for the noise :)