新gulp-ruby-sass alpha任务失败

时间:2015-02-23 20:43:49

标签: javascript sass gulp gulp-ruby-sass

我已多次使用gulp-ruby-sass,但是在这个新项目中,我的任务失败并出现以下错误:

gulp-ruby-sass stderr: OptionParser::NeedlessArgument: needless argument: --sourcemap=none  Use --trace for backtrace.

这是 package.json

{
"name": "new",
  "version": "1.0.0",
  "main": "gulpfile.js",
  "license": "ISC",
  "devDependencies": {
    "gulp": "^3.8.11",
    "gulp-concat": "^2.5.2",
    "gulp-connect": "^2.2.0",
    "gulp-ng-annotate": "^0.5.2",
    "gulp-ruby-sass": "^1.0.0-alpha.3",
    "gulp-sourcemaps": "^1.3.0"
  }
}

Gulpfile.js:

// Include gulp
var gulp = require('gulp'); 

// Include Our Plugins
var concat      = require('gulp-concat');
var uglify      = require('gulp-uglify');
var minifyCSS   = require('gulp-minify-css');
var ngannotate  = require('gulp-ng-annotate');
var sass        = require('gulp-ruby-sass');
var sourcemaps  = require('gulp-sourcemaps');
var connect     = require('gulp-connect');
var gutil       = require('gulp-util');

var paths = {
  js: ['assets/js/app.js', 'assets/js/controllers/*.js', 'assets/js/services/*.js', 'assets/js/directives/*.js'],
  sass: ['assets/css/styles.scss']
};

//SASS task
gulp.task('sass', function () {
    return sass (paths.sass)
      .pipe(concat('all.min.css'))
      .pipe(gulp.dest('assets/css/'))
      .pipe(connect.reload());
});

styles.scss:

@import "modules/mixins.scss";
@import "modules/vars.scss";    
@import "modules/reset.scss";    
@import "modules/header.scss";
@import "modules/footer.scss";

文件夹结构是:

app
    assets
        css
            modules
                header.scss
                footer.scss
                etc....
            styles.scss (this is outside of the modules folder)

就像我说的那样,我在过去的一年里多次使用过这个插件。看来这个' alpha'版本引起了很多问题。

有没有人遇到过这个问题?我该如何解决。

我的整个项目暂停,直到解决:(

1 个答案:

答案 0 :(得分:3)

已解决 - 拥有超出SASS的数据版本。需要大于v3.4