作曲家+twitter引导程序2


Composer + twitter bootstrap 2

如何添加此回购https://github.com/twbs/bootstrap-sass/tree/2.1-stable到我的composer.json?

我试过这个:

"minimum-stability": "dev",
"require-dev": {
  "twbs/bootstrap-sass": "dev-2.1-stable"
}

但出现错误:

The requested package twbs/bootstrap-sass could not be found in any version, there may be a typo in the package name

dev-2.1-stable不在包中:

https://packagist.org/packages/twbs/bootstrap-sass

这是他们git回购中的一个分支机构,但他们还没有向packagist提交这些版本(或者他们在分支机构上提供的标签对packagist自己获取它们无效:https://packagist.org/about)

我假设您知道他们有可用的版本3。另外,你没有安装Ruby宝石吗?要使用他们的说明进行安装,请将软件包添加到您的Gemfile中,而不是添加到composer中。

如果你确实想通过composer安装,它必须是一个composer包https://packagist.org/packages/twbs/bootstrap-sass看起来只有版本3和更高版本可用。

尝试使用:

"require-dev": {
    "twbs/bootstrap-sass": "3.2.*"
}

注意上面的3,我尝试了2.1.*,但找不到它。3.2.*运行良好。

此外,如果你想知道*只是"最新"的意思。如果你想要2.1,你可能必须通过Ruby Gems来实现。