【发布时间】:2016-02-10 15:48:19
【问题描述】:
我在使用 Compass 编译单个样式表时遇到问题。我可以使用compass compile 来处理所有文件,并使用compass watch 来监控更改。但是当我尝试将特定文件分配给 compass compile 时,我收到以下错误:
单独的样式表必须在 sass 目录中
我的目录结构:
project root
- util
-- compass
--- config.rb
- www
-- css
--- [destination for .css files]
-- sass
--- [.scss files]
我的 config.rb:
project_type = :stand_alone
# Set this to the root of your project when deployed:
project_path = "../../"
http_path = "www" # The path to the project when running within the web server.
css_dir = "www/css" # relative to project_path
sass_dir = "www/sass" # relative to project_path
images_dir = "www/images" # relative to project_path
javascripts_dir = "www/js" # relative to project_path
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
output_style = :compressed
# To enable relative paths to assets via compass helper functions. Uncomment:
relative_assets = true
# generate sourcemaps
sourcemap = true
从/util/compass 文件夹运行时,以下工作正常:
compass compile
compass watch
这些不起作用:
compass compile builder.scss
compass compile ../../www/sass/builder.scss
compass compile www/sass/builder.scss
并导致错误,这可能意味着找不到scss文件。
我做错了什么?
【问题讨论】:
标签: sass compass-sass compass