如何配置composer.json只检索指定的文件?

时间:2013-10-04 14:47:47

标签: composer-php

我想使用composer安装twitter bootstrap,这是我的composer.json

{
    "name": "Bootstrap",
    "description": "Bootstrap 3.0",
    "type": "component",
    "require": {
        "components/bootstrap": "3.0.*"
    },
    "config": {
        "component-dir": "assets"
    },
    "extra": {
        "components": {
                "files": [
                        "js/bootstrap.min.js",
                        "css/*.css",
                        "fonts/*"
                ]
        }
    }
}

结果我仍然得到想要的东西,例如

  1. assets / jquery目录(我只指定了bootstrap组件)
  2. assets / bootstrap / js / bootstrap.js(我只指定了bootstrap.min.js)
  3. 供应商/目录(就像我不想要的另一个副本)
  4. enter image description here

    enter image description here

    我只想使用bootstrap,因为我是一名Web应用程序开发人员,所以我不想要这些文件,我知道,如果我从github.com下载了zip文件,我可以手动提取,只是想要我想要的,但我希望使用作曲家,因为无论何时发布更新,我都可以使用作曲家更新,以防我有一个正确的composer.json文件。

    所以,请帮我编辑composer.json以满足更多要求,请至少帮忙解决任何问题,这可能是一个很好的起点。

    感谢。

0 个答案:

没有答案
相关问题