【问题标题】:Are two copies of bootstrap.css supposed to be generated by Compass when using bootstrap-sass?使用 bootstrap-sass 时 Compass 是否应该生成两个 bootstrap.css 副本?
【发布时间】:2014-10-17 12:25:24
【问题描述】:

我正在尝试使用 sinatra (1.4.5)、slim (2.0.3)、sass (3.4.0) 和 bootstrap-sass (3.2.0.1) gems 设置一个 ruby​​ 网络项目.

由于我使用的是 Sass,因此我决定尝试使用 compass (1.0.1) gem 从我的 .scss 文件中自动生成 .css

我按照bootstrap-sass github page 上的说明使用指南针,即:

compass create my-new-project -r bootstrap-sass --using bootstrap

但是,我注意到这总是会生成 2 个 bootstrap.css 副本(git diff 告诉我除了文件路径之外是相同的,因为它们位于不同的目录中):

... (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 副本?如果没有,我怎样才能让指南针停止生成 2 个副本?

【问题讨论】:

    标签: css ruby twitter-bootstrap compass-sass bootstrap-sass


    【解决方案1】:

    显然,Unnecessary file in assets git issuepull request 正在对此进行处理。正如glebm 在拉取请求中提到的那样,在bootstrap-sass gem 的下一个版本中它应该不再是一个问题。

    如上面提到的拉取请求中所述,解决此烦恼的一个简单方法是在 bootstrap-sass gem 中删除 assets/stylesheets/bootstrap/bootstrap.scss

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-02-19
      • 2010-11-06
      • 2012-12-20
      • 2015-05-02
      • 2014-03-01
      • 1970-01-01
      • 2015-04-03
      相关资源
      最近更新 更多