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


- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- 失败的 Canvas 360 jquery 插件 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01