Answer the question
In order to leave comments, you need to log in
Error 'Task gulp.spritesmith is not in your gulpfile'?
Hello.
There was such an error when trying to run
spritesmith in gulp
there is spritesmith in gulpfile, it is also in package.json after installation.
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
browserSync = require('browser-sync').create(),
pug = require('gulp-pug'),
spritesmith = require('gulp.spritesmith'),
prettify = require('gulp-prettify'),
uncss = require('gulp-uncss');
gulp.task('sprite', function () {
var spriteData = gulp.src('img/icons/*.png').pipe(spritesmith({
imgName: 'sprite.png',
cssName: 'sprite.sass',
imgPath: '/img/sprite.png'
}));
spriteData.css.pipe(gulp.dest('./sass/'));
spriteData.img.pipe(gulp.dest('./img/'));
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question