有一个 ruby gem,它允许描述称为sass-css-importer的功能,它允许使用以下语法在文件中包含以.css
from结尾的.scss
文件:
@import "CSS:../../bower_components/alertify/themes/alertify.core";
@import "CSS:../../bower_components/alertify/themes/alertify.default";
@import "CSS:../../bower_components/normalize-css/normalize";
@import "../../../bower_components/bourbon/app/assets/stylesheets/_bourbon";
@import "../../../bower_components/neat/app/assets/stylesheets/_neat";
它可以Gemfile
像这样添加:
source "http://rubygems.org"
gem "sass-css-importer"
并且需要Gruntfile
:
sass:
options:
quiet: true
require: 'sass-css-importer'
static:
files: [
expand: true
cwd: 'source/styles'
src: ['*.scss']
dest: 'build/styles'
ext:
YMMV。祝你好运!