简体   繁体   English

在laravel 4中没有使用composer安装Twitter引导程序

[英]Twitter bootstrap not installing using composer in laravel 4

I am working on the following tutorial: 我正在研究以下教程:

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

following this my composer.json filehas the following: 在此之后我的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"
}

I run composer to install the dependencies 我运行composer来安装依赖项

$ composer install --dev

If I then go into the vendor folder there is no twitter-bootstrap folder. 如果我然后进入vendor文件夹,则没有twitter-bootstrap文件夹。 ( The other dependencies appear to have been installed. (其他依赖项似乎已安装。

when I run update: 当我运行更新时:

$ 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

-- No errors, the bootstrap files are not in the vendor folder - 没有错误,引导程序文件不在供应商文件夹中

Has anyone run into this problem. 有没有人遇到这个问题。 Is there any way to fix it? 有什么办法可以解决吗?

composer require "twitter/bootstrap":"*"
为我工作得很好

The above solution doesn't seem to work anymore, I had to add another package inside my composer.json which pointed to the existing bootstrap repository ( https://github.com/twbs/bootstrap ) 上面的解决方案似乎不再起作用,我不得不在我的composer.json中添加另一个包,它指向现有的bootstrap存储库( https://github.com/twbs/bootstrap

Below is a partial composer.json that works for me. 下面是一个适合我的部分 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": "*"
},

You need to update composer.phar 你需要更新composer.phar

Run composer self-update to update composer.phar then after you need to run 运行composer自我更新以更新composer.phar然后在需要运行之后

composer update to install twitter bootstrap 作曲家更新安装twitter bootstrap

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM