0

在此处输入图像描述

向我显示此错误不知道如何解决。

我的 gulpfile.js 代码如下

var gulp = require('gulp'),
uglify = require('gulp-uglify'),
sass = require('gulp-ruby-sass');
gulp.task('default', function(){
   gulp.src('js/*.js')
   .pipe(uglify())
   .pipe(gulp.dest('minjs'));
});
//style task
gulp.task('styles', function(){
   gulp.src('scss/**/*.scss')
   .pipe(sass())
   .pip(gulp.dest('css/'));
});
4

1 回答 1

0

Your gulp task would probably work with gulp-sass but you're using gulp-ruby-sass which isn't the same. Note the gulp-ruby-sass documentation:

gulp.task('sass', () =>
  sass('source/file.scss') // not .pipe(sass())
    .on('error', sass.logError)
    .pipe(gulp.dest('result'))
);
于 2017-03-23T06:05:07.727 回答