通过Bower的基础图标字体

时间:2014-05-10 21:35:11

标签: sass zurb-foundation bower

我刚刚通过Bower安装了Foundation Icon Fonts,我想知道如何最好地将它们包含在我的app.scss文件中,同时保留Bower文件夹。以下是我收到的尝试设置和错误。我知道我可以将文件放在我网站的scss文件夹中或基础文件夹中,但是没有理由使用Bower。

我得到的错误是:

 error scss/app.scss (Line 13: File to import not found or unreadable: foundation-icon-fonts/_foundation-icons.scss.

bower_components文件夹:

 > bower_components
 >> fastclick
 >> foundation
 >> foundation-icon-fonts
 >> ...other components

bower.json:

 {
    "name": "foundation-compass-app",
    "version": "0.0.1",
    "private": "true",
    "dependencies": {
        "foundation": "~5.2.2",
        "foundation-icon-fonts": "*"
    }
 }

config.rb:

 # Require any additional compass plugins here.
 add_import_path "bower_components/foundation/scss"
 add_import_path "bower_components/foundation-icon-fonts"

 http_path = "/"
 css_dir = "stylesheets"
 sass_dir = "scss"
 images_dir = "images"
 javascripts_dir = "js"

 output_style = :compressed

1 个答案:

答案 0 :(得分:2)

config.rb

add_import_path "bower_components/foundation-icon-fonts"

app.scss

$fi-path: "/bower_components/foundation-icon-fonts";
@import "foundation-icons";