compass参数问题
gulp.task('sass', ['del'], function() {
return gulp.src('./sassDir/style/*.scss')
.pipe(compass({
config_file: path.join(process.cwd(), 'config.rb'),
project: path.join(process.cwd(), '/sassDir'),
css: './',
sass: 'style',
}))
.on('end', function() {
console.log('compass 编译完成')
})
});
实际执行的命令
/home/suntopo/.rvm/gems/ruby-2.3.0/bin/compass
[ 'compile',
'/home/suntopo/Desktop/gulp-compass-demo/sassDir',
'/home/suntopo/Desktop/gulp-compass-demo/sassDir/style/haha.scss',
'-c',
'/home/suntopo/Desktop/gulp-compass-demo/config.rb',
'--relative-assets',
'--css-dir',
'./',
'--sass-dir',
'sass' ]
compass的命令格式
Usage: compass compile [path/to/project] [path/to/project/src/file.sass ...] [options]
疑问在于compile的第二参数[path/to/project/src/file.sass ...]
, '/home/suntopo/Desktop/gulp-compass-demo/sassDir/style/haha.scss',
看参数感觉像说sass的源,但是实际上只是sass源中的最后一个sass文件,那么这个参数是干哈的呢
1 回复
@i5ting 桑大帮忙看下呢