Composer,从/ vendor /文件夹中移动文件 [英] Composer, move files from /vendor/ folder
问题描述
我刚刚开始使用composer与PHPStorm'因为我无聊从github手动下载依赖。但有一些我不能理解的事情。
I've just started using composer with PHPStorm 'cause I'm bored of downloading dependencies from github manually. But there are some things I can't understand.
Composer总是将文件下载到 / vendor 文件夹中。就像我添加Twitter Bootstrap一样 - 它将下载到 / vendor / twitter / bootstrap 文件夹。但我需要它进入我的 / webroot / bootstrap / 目录。如何移动这个文件?因为如果我手动移动它们,以后不会使用composer更新命令更新。
Composer always downloads files into /vendor folder. Like if I add Twitter Bootstrap - it will be downloaded to /vendor/twitter/bootstrap folder. But I need it to be into my /webroot/bootstrap/ directory. How do you move this files? Because if I move it manually - they won't be updated later using composer update command.
或者如果我使用micro php framevork slim。我添加了 slim / slim 依赖关系。但它会被放置到 / vendor / slim / slim /...
Or if I use micro php framevork slim. I've added slim/slim dependency. But it will be placed into /vendor/slim/slim/...
那么我该怎么办呢?使用Phing或其他部署工具将文件从/ vendor移动到所需的目标?你用什么?
So what should I do? Use Phing or some other deployment tool to move files from /vendor to desired destination? What do you use?
这不是我需要的,但它适用于css / js / etc。
http://www.phpclasses.org/blog/package/8429/post/1-Using-Composer-to-Install-JavaScript-CSS-and-Images-Under-the-Web- Document-Directory.html
That's not exactly whar I need, but it works for css/js/etc. http://www.phpclasses.org/blog/package/8429/post/1-Using-Composer-to-Install-JavaScript-CSS-and-Images-Under-the-Web-Document-Directory.html
推荐答案
"config": {
"vendor-dir": "path/to/wherever"
},
在您的composer.json文件
in your composer.json file
这篇关于Composer,从/ vendor /文件夹中移动文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!