问题描述
我试图编译我的 code>并安装了所有东西。
我的gulp sass gulp任务喜欢这样:
$ b $
gulp.task('sass',['images'],function(){
return gulp.src('src / sass / *。{sass,scss}')
.pipe(sass({
bundleExec:true,
sourcemap:true,
sourcemapPath:'../sass'
。))
.on('error',handleErrors)
.pipe(gulp.dest('build'));
});
所以我不能在我的生活中找出如何包含 susy ,所以它符合使用 gulp ,我没有看过,似乎也找不到与此相关的任何内容。
$您可以使用 gulp-compass ,您只需要在系统中安装指南针并通过npm安装 gulp-compass 包,这里是一个示例代码:var compass = require('gulp-compass');
gulp.task('compass',function(){
return gulp.src('./ src / *。scss')
.pipe(compass({
// Gulp-compass选项和路径
css:'app / assets / css',
sass:'app / assets / sass',
require:['susy']
。))
.on('error',handleErrors)
.pipe(gulp.dest('app / assets / temp'));
});
有关此套餐的详情
I am trying to get gulp to compile my sass and use the susy grid/framework.
I'm having troubles finding any information about this online.
I have included:
"gulp-ruby-sass": "^0.7.1",
into my package.json and installed everything.
My gulp sass gulp task likes like so:
gulp.task('sass', ['images'], function () { return gulp.src('src/sass/*.{sass, scss}') .pipe(sass({ bundleExec: true, sourcemap: true, sourcemapPath: '../sass' })) .on('error', handleErrors) .pipe(gulp.dest('build')); });
So I can't for the life of me work out how to include susy so it complies using gulp, I haven't looked and can't seem to find anything relating to this online.
You can use gulp-compass, you only need to have compass installed in your system and install gulp-compass package through npm, here is a sample code:
var compass = require('gulp-compass'); gulp.task('compass', function() { return gulp.src('./src/*.scss') .pipe(compass({ // Gulp-compass options and paths css: 'app/assets/css', sass: 'app/assets/sass', require: ['susy'] })) .on('error', handleErrors) .pipe(gulp.dest('app/assets/temp')); });
More info about this package here
这篇关于用GULP编译SASS和SUSY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!