S
S
Sergey Burduzha2017-12-25 20:41:39
Sprites
Sergey Burduzha, 2017-12-25 20:41:39

Why is svgsprite not working?

Here is my project https://github.com/seriiserii825/bugfix
Here is the code in gulpfile.js

gulp.task('sprites', function () {
    return gulp.src('src/assets/i/icons/svg/*.svg')
        .pipe(svgSprite())
        .pipe(gulp.dest("src/assets/")) // Write the sprite-sheet + CSS + Preview
        .pipe(filter("**/*.svg"))  // Filter out everything except the SVG file
        .pipe(svg2png())           // Create a PNG
        .pipe(gulp.dest("src/assets/"));
});

Help to move from a dead place.
Here is the project structure
5a4138f17191b412450969.jpeg
I read the documentation on the site https://www.npmjs.com/package/gulp-svg-sprites
but it doesn't work for me. I call gulp sprites and nothing happens. The path seems to be correct.
There is another sprite in gulpfile but it works directly with inline images and I need an alternative for background.
I will be glad to help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Burduzha, 2017-12-25
@serii81

Our mistake, the fact is that the plugin is called gulp-svg-sprites, and I installed gulp-svg-sprite earlier, and I used it. Therefore, nothing happened. Now installed another plugin and everything worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question