symfony – Composer – 下载没有composer.json的git repos

前端之家收集整理的这篇文章主要介绍了symfony – Composer – 下载没有composer.json的git repos前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试在Symfony 2.1中使用composer从 github库中删除供应商,这些库不是作曲家意识的,可能永远不会.

举些例子:
Old Deps文件

  1. [jQuery]
  2. git=git://github.com/jquery/jquery.git
  3. version=1.8.1
  4.  
  5. [Mocha]
  6. git=https://github.com/visionmedia/mocha.git

作曲家(不起作用)

  1. "repositories": [
  2. {
  3. "type": "package","package": {
  4. "name": "jquery","version": "1.8.1","dist": {
  5. "url": "git://github.com/jquery/jquery.git","type": "git"
  6. }
  7. }
  8. }
  9. ],"require": {
  10. "jquery": "1.8.1"
  11. }

解决方法

如果从git下载,则需要指定“源”包,而不是“dist”包.使用:
  1. "repositories": [
  2. {
  3. "type": "package","source": {
  4. "url": "git://github.com/jquery/jquery.git","type": "git","reference": "1.8.1"
  5. }
  6. }
  7. }
  8. ],"require": {
  9. "jquery": "1.8.1"
  10. }

猜你在找的JavaScript相关文章