Saving disk space on your composer projects
Have you ever did a "du -sh" on your vendor folder and became shocked because of the size?
As example, if you require the zend framework 2 in your project, you have to download and store over 170 MB in your disk. Hopefully, you don't think this is the size of the framework.
And you are right, over 150 MB of the size is inside the ".git" folder. That is "nice to know" information if you are a zend framework 2 developer, but if you simple use it, you don't need it.
Thanks to carlos buenos vinos, all you need to do is to download a tool called compify. Once setted up on your machine, you only have to change into your project root and execute "compify crush vendor/".
You can automate that call by binding it with the "composer update" call, either via shell alias, shell script, ant target or phing target (or are you using maven for a php project?).
Trackbacks
The author does not allow comments to this entry
Comments
Display comments as Linear | Threaded