我正在尝试使用安装 zurbs 基础框架
我已经安装了这个 gem:zurb-foundation (4.3.1)
从我的项目中,我这样做:
compass install foundation
我得到:
No such framework: "foundation"
实际如何使用已安装的框架?
我正在尝试使用安装 zurbs 基础框架
我已经安装了这个 gem:zurb-foundation (4.3.1)
从我的项目中,我这样做:
compass install foundation
我得到:
No such framework: "foundation"
实际如何使用已安装的框架?
命令是:
compass install -r zurb-foundation foundation
如果您已经安装了 zurb-foundation,那么使用基础创建新项目的命令是:
compass create <project-name> -r zurb-foundation --using foundation
如果您正在使用 Foundation 和 sass 处理已经存在的项目,则需要根目录中的 config.rb 文件:
require 'zurb-foundation'
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
preferred_syntax = :scss
确保您require 'zurb-foundation'
在顶部。当我有一个已经存在的项目时,这就是为我解决的问题。
以下命令应该会有所帮助,这里的文档中也有说明。
在“创建你的第一个项目”下找到。
$ compass create <project-name> -r zurb-foundation --using foundation
我应该注意这是创建一个新项目
如果它正在添加到现有项目中,也许您错过了: