我正在尝试让 gulp 编译我的 sass 并使用 susy 网格/框架.
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.
我已包括:
"gulp-ruby-sass": "^0.7.1",
进入我的 package.json 并安装一切.
into my package.json and installed everything.
我的 gulp sass gulp 任务喜欢这样:
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'));
});
所以我一生都无法弄清楚如何包含 susy 以使其符合使用 gulp 的要求,我没有看过也似乎看不到在线查找与此相关的任何内容.
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.
你可以使用gulp-compass,你只需要在你的系统中安装compass并安装gulp-compass 通过 npm 打包,示例代码如下:
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'));
});
关于这个包的更多信息这里
这篇关于使用 GULP 编译 SASS 和 SUSY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
Browserify,Babel 6,Gulp - 传播运算符上的意外令牌Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 传播运算符上的意外令牌)
是否可以将标志传递给 Gulp 以使其以不同的方式Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以将标志传递给 Gulp 以使其以不同的方式运行任务
为什么我们需要在全局和本地安装 gulp?Why do we need to install gulp globally and locally?(为什么我们需要在全局和本地安装 gulp?)
如何一个接一个地依次运行 Gulp 任务How to run Gulp tasks sequentially one after the other(如何一个接一个地依次运行 Gulp 任务)
由于 MIME 类型而未加载样式表Stylesheet not loaded because of MIME-type(由于 MIME 类型而未加载样式表)
打开 Javascript 文件时 Visual Studio 2015 崩溃Visual Studio 2015 crashes when opening Javascript files(打开 Javascript 文件时 Visual Studio 2015 崩溃)