如何使用composer获取多个供应商目录? [英] How to get multiple vendor directories with composer?

查看:132
本文介绍了如何使用composer获取多个供应商目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目依赖于ZF和JS库。我希望能够将ZF库部署到正常位置(vendor / zendframework / zendframework1),然后将我的JS库部署到其他地方(public / my-vendor / my-library)。有没有这样做?

My project relies on ZF and on a JS library. I wanted to be able to deploy the ZF library to the normal location (vendor/zendframework/zendframework1) but then deploy my JS library to somewhere else (public/my-vendor/my-library). Is there anyway to do this?

推荐答案

我遇到了符号链接的想法,但我想自动化这个而不是手动创建符号链接。我打算创建一个作曲家脚本来创建符号链接。然后我发现Windows和* nix上的符号链接需要以不同的方式创建,这使得这个解决方案变得更加混乱。我发现在作曲家文档中,他们在自定义安装程序页面上讨论了同样类型的问题,并说要解决此问题以创建自己的自定义安装程序。

I came across the symlink idea but I wanted to automate this instead of manually creating the symlinks. I was going to create a composer script to create the symlink. I then found that symlinks on Windows and *nix need to be created in different ways which made this solution get messier by the second. I found that in the composer docs they talk about this same type of issue on the custom installers page and say that to solve this to create your own custom installer.

  • Relavent docs section: http://getcomposer.org/doc/articles/custom-installers.md
  • My custom installer: https://github.com/ddelrio1986/zf1-public-asset-installer

这篇关于如何使用composer获取多个供应商目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆