我已经多次使用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)
就像我说的那样,在过去的一年中,IVE多次使用了该插件.似乎此“ alpha”版本引起了很多问题.
有人遇到过这个问题吗?我该如何解决.
我的整个项目都停下来,直到解决为止:(
解决方法:
已解决-数据版本超出SASS.需要大于v3.4