Car*_*cho 9 zurb-foundation compass-sass
问题
基金会5上周发布,这很好,但新版本要求使用Bower将F5与SASS一起使用,官方文档似乎有点不完整和不成熟.
我正在尝试使用文档提出的步骤创建项目:
[sudo] npm install -g bower
Run Code Online (Sandbox Code Playgroud)
然后
gem install foundation
Run Code Online (Sandbox Code Playgroud)
这里没问题.问题是创建Compass项目时:
foundation new MY_PROJECT
cd MY_PROJECT
compass compile
Run Code Online (Sandbox Code Playgroud)
Compass编译后,我收到以下错误:
directory stylesheets/
error scss/app.scss (Line 1: File to import not found or unreadable: settings.
Load paths:
/home/cartucho/MY_PROJECT/scss
/var/lib/gems/1.9.1/gems/compass-0.12.2/frameworks/blueprint/stylesheets
/var/lib/gems/1.9.1/gems/compass-0.12.2/frameworks/compass/stylesheets
/home/cartucho/MY_PROJECT/bower_components/foundation/scss
Compass::SpriteImporter)
create stylesheets/app.css
Run Code Online (Sandbox Code Playgroud)
指南针配置文件(config.rb):
# Require any additional compass plugins here.
add_import_path "bower_components/foundation/scss"
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "scss"
images_dir = "images"
javascripts_dir = "javascripts"
Run Code Online (Sandbox Code Playgroud)
SASS文件(app.sass):
@import "settings";
@import "foundation";
...
Run Code Online (Sandbox Code Playgroud)
问题似乎在于config.rb:
add_import_path "bower_components/foundation/scss"
Run Code Online (Sandbox Code Playgroud)
因为Compass无法尝试导入文件settings,foundation但我不知道如何修复它.任何帮助将受到高度赞赏.
谢谢.
您需要 foundation new MY_PROJECT通过替换MY_PROJECT要安装项目的文件夹来更改行.之后,确认上面指定的目录中存在这些文件夹 - "bower_components/foundation/scss"
启动项目运行compass init然后compass watch(在终端中)监视.sass文件的更改.
就个人而言,我不会走那条路,而是使用http://koala-app.com/转换或"编译"我的Sass.这是免费的,真棒.