duanlei0282 2013-07-15 06:36
浏览 23

作曲家和Yii

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 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?

  • 写回答

2条回答 默认 最新

  • dsq30861 2013-07-15 23:19
    关注

    With composer we work in a different way. With composer our application take care only of its code. In fact, if you kork with git, you must add yii folder to .gitignore couse is not your application folder. This is the symfony way.

    What about Yii!? First of all I suggest you to start yii projects with:

    $ composer create-project yiisoft/yii path/to/your/project
    

    This is the Yii way to work with yii and composer. After that, when you finish to dowload yii, composer ask you if you want to keep or not yii's git files. You can simply say no, and remove manually these files. You can also try to fork yiisoft/yii and improve this behavior so this removing stuffs will happen automatically.

    评论

报告相同问题?

悬赏问题

  • ¥15 python变量和列表之间的相互影响
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)