A
A
Anastasia Dementieva2016-10-01 22:02:57
gulp.js
Anastasia Dementieva, 2016-10-01 22:02:57

Gulp.spritesmith what is wrong?

gulp.task('sprites', function() {
    var spriteData = 
        gulp.src('app/img/sprite/*.png') // путь, откуда берем картинки для спрайта
            .pipe(spritesmith({
                imgName: 'sprite.png',
                cssName: 'sprite.css',
                
            }));

  return  spriteData.pipe(gulp.dest('app/img')); // путь, куда сохраняем картинку
   return spriteData.pipe(gulp.dest('app/css')); // путь, куда сохраняем стили
});

Error : undefined:8
if (!(array0.shape[shapeIndex+0]===array1.shape[shapeIndex+0])) throw new Error('cwise: Arrays do not all have the same shape!')
Error: cwise: Arrays do not all have the same shape! and long paths to plugin files...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2016-10-01
@sguschenka

gulp.task('sprites', function() {
  var spriteData = gulp.src('app/img/sprite/*.png').pipe(
    spriteSmith({
      imgName: 'sprite.png',
      cssName: 'sprite.css'
    })
  );
  spriteData.css.pipe(gulp.dest('app/css'));
  return spriteData.img.pipe(gulp.dest('app/img'));
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question