3

我已经多次使用 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());
});

样式.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)

就像我说的,我在过去一年中多次使用过这个插件。看来这个“阿尔法”版本引起了很多问题。

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

在解决此问题之前,我的整个项目都处于暂停状态:(

4

1 回答 1

3

已解决 - 有一个 SASS 的数据版本不足。需要大于 v3.4

于 2015-02-23T21:00:39.927 回答