Compiling SASS and SUSY with GULP(使用 GULP 编译 SASS 和 SUSY)
问题描述
我正在尝试让 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 GULP 编译 SASS 和 SUSY
基础教程推荐
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
