2

我正在研究以下教程:

http://net.tutsplus.com/tutorials/javascript-ajax/combining-laravel-4-and-backbone/

在此之后,我的 composer.json 文件具有以下内容:

{
  "require": {
    "laravel/framework": "4.0.*",
    "way/generators": "dev-master",
    "twitter/bootstrap": "dev-master",
    "conarwelsh/mustache-l4": "dev-master"
  },
  "require-dev": {
    "phpunit/phpunit": "3.7.*",
    "mockery/mockery": "0.7.*"
  },
  "autoload": {
    "classmap": [
      "app/commands",
      "app/controllers",
      "app/models",
      "app/database/migrations",
      "app/database/seeds",
      "app/tests/TestCase.php"
    ]
  },
  "scripts": {
    "post-update-cmd": "php artisan optimize"
  },
  "minimum-stability": "dev"
}

我运行 composer 来安装依赖项

$ composer install --dev

如果我然后进入供应商文件夹,则没有 twitter-bootstrap 文件夹。(似乎已经安装了其他依赖项。

当我运行更新时:

$ composer update --dev
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/console (2.3.x-dev 35da735)
- Installing symfony/console (2.3.x-dev 911cdac)
Downloading: 100%

Writing lock file
Generating autoload files
Generating optimized class loader
Compiling common classes

-- 没有错误,引导文件不在供应商文件夹中

有没有人遇到过这个问题。有什么办法可以解决吗?

4

3 回答 3

9

composer require "twitter/bootstrap":"*"
对我来说工作得很好

于 2013-07-02T18:44:44.753 回答
3

上面的解决方案似乎不再起作用,我不得不在我的 composer.json 中添加另一个包,它指向现有的引导存储库(https://github.com/twbs/bootstrap

下面是对我有用的部分composer.json。

"repositories": [
    {
        "type": "package",
        "package": {
            "version": "3.0.0",
            "name": "twbs/bootstrap",
            "source": {
                "url": "https://github.com/twbs/bootstrap.git",
                "type": "git",
                "reference": "master"
            },
            "dist": {
                "url": "https://github.com/twbs/bootstrap/zipball/master",
                "type": "zip"
            }
        }
    }
],
"require": {
    "laravel/framework": "4.0.*",
    "twbs/bootstrap": "*"
},
于 2013-07-30T09:39:43.430 回答
0

您需要更新 composer.phar

运行composer self-update以更新 composer.phar 然后在您需要运行之后

作曲家更新以安装 twitter 引导程序

于 2014-06-12T11:36:10.890 回答