gulp插件gulp-ruby-sass版本2.0.4编译不通过
The gulp plugin gulp-ruby-sass version 2.0.4 does not compile
gulp 插件 gulp-ruby-sass 对编译器不起作用 "gulp-ruby-sass": "^2.0.4"
同时它确实与它一起工作自己的旧版本 "gulp-ruby-sass": "^0.7.1"
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
notify = require("gulp-notify"),
bower = require('gulp-bower');
var config = {
sassPath: './resources/sass',
bowerDir: './bower_components'
};
gulp.task('css', function () {
return gulp.src(config.sassPath + '/style.scss')
.pipe(sass({
loadPath: [
'./resources/sass',
config.bowerDir + '/bootstrap-sass/assets/stylesheets',
config.bowerDir + '/font-awesome/scss', ]
})
.on("error", notify.onError(function (error) {
return "Error: " + error.message;
})))
.pipe(gulp.dest('./public/css'));
});
代码适用于旧版本 gulp-ruby-sass,新版本 2.0.4
需要另一种方式用于编码
gulp.task('css', function () {
return sass(config.sassPath + '/style.scss', {
precision: 6,
stopOnError: true,
cacheLocation: './',
loadPath: [
'./resources/sass',
config.bowerDir + '/bootstrap-sass/assets/stylesheets',
config.bowerDir + '/font-awesome/scss', ]
})
.on("error", notify.onError(function (error) {
return "Error: " + error.message;
}))
.pipe(gulp.dest('./public/css'));
});
gulp 插件 gulp-ruby-sass 对编译器不起作用 "gulp-ruby-sass": "^2.0.4"
同时它确实与它一起工作自己的旧版本 "gulp-ruby-sass": "^0.7.1"
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
notify = require("gulp-notify"),
bower = require('gulp-bower');
var config = {
sassPath: './resources/sass',
bowerDir: './bower_components'
};
gulp.task('css', function () {
return gulp.src(config.sassPath + '/style.scss')
.pipe(sass({
loadPath: [
'./resources/sass',
config.bowerDir + '/bootstrap-sass/assets/stylesheets',
config.bowerDir + '/font-awesome/scss', ]
})
.on("error", notify.onError(function (error) {
return "Error: " + error.message;
})))
.pipe(gulp.dest('./public/css'));
});
代码适用于旧版本 gulp-ruby-sass,新版本 2.0.4
需要另一种方式用于编码
gulp.task('css', function () {
return sass(config.sassPath + '/style.scss', {
precision: 6,
stopOnError: true,
cacheLocation: './',
loadPath: [
'./resources/sass',
config.bowerDir + '/bootstrap-sass/assets/stylesheets',
config.bowerDir + '/font-awesome/scss', ]
})
.on("error", notify.onError(function (error) {
return "Error: " + error.message;
}))
.pipe(gulp.dest('./public/css'));
});