Composer,从/vendor/文件夹中移动文件

Composer, move files from /vendor/ folder(Composer,从/vendor/文件夹中移动文件)
本文介绍了Composer,从/vendor/文件夹中移动文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始在 PHPStorm 中使用 composer,因为我厌倦了手动从 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 update 命令更新.

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/文件夹中移动文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Convert JSON integers and floats to strings(将JSON整数和浮点数转换为字符串)
in php how do I use preg replace to turn a url into a tinyurl(在php中,如何使用preg替换将URL转换为TinyURL)
all day appointment for ics calendar file wont work(ICS日历文件的全天约会不起作用)
trim function is giving unexpected values php(Trim函数提供了意外的值php)
Basic PDO connection to MySQL(到MySQL的基本PDO连接)
PHP number_format returns 1.00(Php number_Format返回1.00)