0
我剛剛開始使用Gulp.js和Sass,而且我一直在使用mixin。gulp-ruby-sass找不到mixins
這裏是我的gulp.js
文件:
var gulp = require('gulp');
var autoprefixer = require('gulp-autoprefixer');
var sass = require('gulp-ruby-sass');
gulp.task('css', function(){
return gulp.src('./assets/scss/main.scss')
.pipe(sass({
style: 'expanded',
noCache: true
}))
.pipe(autoprefixer('last 5 versions'))
.pipe(gulp.dest('./assets/css'));
});
gulp.task('watch', function(){
gulp.watch('./assets/scss/*.scss', ['css']);
});
gulp.task('default', ['css', 'watch']);
這是我main.scss文件:
#data {
@include left(10px);
@include table-base;
}
這是它產生的錯誤:
events.js:72
throw er; // Unhandled 'error' event
^
[gulp] Error in plugin 'gulp-ruby-sass':
Syntax error: Undefined mixin 'left'.
on line 2 of /vagrant/gulp_test_1/assets/scss/main.scss, in `left'
from line 2 of /tmp/a4d96d4a-b823-4828-a37c-eab307477784/main.scss
at ChildProcess.<anonymous> (/vagrant/gulp_test_1/node_modules/gulp-ruby-sass/index.js:74:25)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
所有其他薩斯東西工作正常。這只是混淆錯誤。
我已經安裝了Compass 0.12.2
我失去了任何寶石/模塊?
系統使用Ubuntu VM在Vagrant上運行。