我正在尝试基本的sass +指南针在建立css。当我运行任务时,出现错误Error: error main.scss (Line 2: Undefined mixin 'user-select'.)
我安装了sass和compass。吞咽指南针也是如此。指南针无法找到mixins
任何想法我的配置有什么问题?
最低配置是我表现这种方式:
我gulpfile.js
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
gulp.task('sass', function() {
gulp.src('./scss/*.scss')
.pipe(sass({ compass: true, sourcemap: true, style: 'compressed' }))
.pipe(gulp.dest('./css'));
});
我顶嘴文件:
%button {
@include user-select('none');
}
.button-orange {
@extend %button;
background-color: orange;
}
我没有罗盘config.rb 。寻找一种没有它的方式。
可能重复:http://stackoverflow.com/questions/17976140/false-positive-undefined-variable-error-when-compiling-scss/17976934 – cimmanon
这与链接中的内容不同。 –
你在你的Gulpfile的'config.rb'里有什么? –