V
V
Vadim Somov2017-11-04 10:52:15
HTML
Vadim Somov, 2017-11-04 10:52:15

How to make an svg sprite?

Hello! Having trouble generating svg sprites with gulp. I found ready-made solutions, but nothing comes out, although there seem to be no errors, and the console writes that the task completed successfully. https://github.com/Kafkae/blog.github.io here are the sources. And this is the gulpfile https://github.com/Kafkae/blog.github.io/blob/mast...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Semenov, 2017-11-05
@AleksKek

In gulpfile.js, the slash is missing in the svg-sprite task:

gulp.task('svg-sprite', function(cb) {
    return gulp.src('app/img/sprites*.svg')
        .pipe(svgsprite(config))
        .pipe(gulp.dest('app/img'));
});

Gulp just doesn't find the files.
You: It's probably more correct like this:
('app/img/sprites/*.svg')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question