指南针config.rb位置 [英] Compass config.rb Location

查看:75
本文介绍了指南针config.rb位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将Compass添加到我的现有项目中。
我想保持当前的项目结构,如下所示(简化):

I want to add Compass to my existing project. I want to maintain my current project structure, which looks like this (simplified):

app/
build/    
 |-compass/
assets/
 |-css/
   |-scss
 |-js/
 |-img/

所以我希望所有我的SASS文件都在 assets\css\scss 下>,我想将编译后的CSS文件输出到 \assets\css

So I want all my SASS files under \assets\css\scss and I want to output the compiled CSS files to \assets\css.

运行:

compass create --bare --sass-dir "assets\css\scss" --css-dir "assets\css"

在我的根目录下直接创建Compass config.rb文件。

creates the Compass config.rb file directly under my root.

但是,我希望文件位于 \build\compass 下。

However, I want the file to be under \build\compass.


  1. 如何控制Compass在哪里创建config.rb文件?

  2. 指南针文档说config.rb中的声明(例如css_dir,sass_dir等)都相对于project_path。在哪里定义project_path?


推荐答案

指南针在同一目录中创建config.rb作为您从中运行命令的位置。项目路径是config.rb所在的位置。只要您调整资产的路径,就可以随意将config.rb放置在任意位置。

Compass creates the config.rb in the same directory as where you ran the command from. The project path is where the config.rb resides. You're free to place config.rb wherever you like, as long as you adjust the paths for your assets.

这篇关于指南针config.rb位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆