Composer and Yii(作曲家和 Yii)
问题描述
我使用 composer 作为我的依赖管理器,因为我需要使用 Yii 框架进行开发,所以我将它添加到我的 composer.json 文件中,所以它看起来像这样:
I'm using composer as my dependency manager and since I need to develop with Yii Framework I added it to my composer.json file, so it looks like this:
//other properties...
"require": {
//other dependencies...
"yiisoft/yii": "dev-master"
}
Composer.json 没问题,Yii 下载正确,但我认为 Composer 遗漏了一个功能.我的 yii 目录现在充满了我并不真正需要的垃圾"、演示文件夹、构建文件等等.有没有办法告诉作曲家只保留一些目录并丢弃其他目录?
Composer.json is ok, Yii downloaded correctly, but there is a feature I think composer misses. My yii directory now is full of "rubbish", demo folders, build files bla bla that I don't really need. There is a way to tell composer to keep only some directory and throw away the others?
推荐答案
我遇到了完全相同的问题,所以我结束了 重新打包 Yii 使其只包含框架文件夹.它减少了大约 10Mb 的包.这是 github 存储库链接.
I had the exact same issue, so I ended up repackaging Yii so that it only contains the framework folder. It reduces the package by ~10Mb. Here's a link to the github repo.
只需将以下内容添加到您的 composer.json 文件中即可.
Just add the following to your composer.json file.
{
"require": {
"square1-io/yii-framework": "1.1.14"
}
}
然后运行:
$ composer install
我写了一篇关于它的博文:http://blog.square1.io/post/60830077608/yii-1-1-14-via-composer
I've thrown up a blog post about it: http://blog.square1.io/post/60830077608/yii-1-1-14-via-composer
这篇关于作曲家和 Yii的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:作曲家和 Yii


- PHP - if 语句中的倒序 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01