我正在尝试使用 sinatra 设置一个 ruby web 元素(1.4.5), slim (2.0.3), sass (3.4.0) 和 bootstrap-sass (3.2.0.1) gem 。
由于我使用的是 Sass,所以我决定试用 compass (1.0.1) gem 从我的 .scss
文件自动生成 .css
。
我遵循了 bootstrap-sass github page 上的指示与 compass 一起使用,即:
compass create my-new-project -r bootstrap-sass --using bootstrap
However, I noticed that this always generates 2 copies of bootstrap.css
(which git diff
tells me are the same except for file paths since they are in different directories):
... (other files/directories get made and written)
directory my-new-project/stylesheets/bootstrap
write my-new-project/stylesheets/bootstrap/bootstrap.css
directory my-new-project/stylesheets/bootstrap/bootstrap
write my-new-project/stylesheets/bootstrap/bootstrap/bootstrap.css
这是此安装的预期行为吗?如果是这样,为什么需要 2 个 bootstrap.css
副本?如果没有,我怎样才能让 compass 停止生成 2 个副本?
最佳答案
显然这是在 Unnecessary file in assets
中进行的 git issue和 pull request .在 bootstrap-sass
gem 的下一个版本中,它应该不再是一个问题,正如 glebm
在拉取请求中提到的那样。
如上文提到的拉取请求中所述,解决此问题的一个简单方法是删除 bootstrap-sass
gem 中的 assets/stylesheets/bootstrap/bootstrap.scss
.
关于css - 使用 bootstrap-sass 时,Compass 是否应该生成 bootstrap.css 的两个副本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25467513/