K
K
kamwork2015-01-28 21:11:11
gulp.js
kamwork, 2015-01-28 21:11:11

Sprites are not generated through - gulp-svg-sprite, what could be the reason?

I put everything according to the instructions https://www.npmjs.com/package/gulp-svg-sprite
Having previously installed - https://github.com/jkphl/svg-sprite , at first globally, but when the task was called, an error occurred that did not can find this module, installed with --save-dev the error is gone, but the task generates an empty file :(

var gulp = require('gulp'),
svgSprite = require('gulp-svg-sprite');

var
// Basic configuration example
config  = {
    mode                : {
        css                : {        // Activate the «css» mode
            render        : {
                css        : true    // Activate CSS output (with default options)
            }
        }
    }
};

gulp.task('sprites', function () {
    return gulp.src('app/images/svg/*.svg', {cwd: 'assets'})
        .pipe(svgSprite(config))
        .pipe(gulp.dest('out'));
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
selyaninov, 2020-12-27
@selyaninov

gulp svgSprite will solve this problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question