Skip to content

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

Keine Trackbacks

Kommentare

Ansicht der Kommentare: Linear | Verschachtelt

Noch keine Kommentare

Die Kommentarfunktion wurde vom Besitzer dieses Blogs in diesem Eintrag deaktiviert.

Kommentar schreiben

Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet.
Um einen Kommentar hinterlassen zu können, erhalten Sie nach dem Kommentieren eine E-Mail mit Aktivierungslink an ihre angegebene Adresse.

Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss, um dieses Verfahren anzuwenden.
CAPTCHA

Markdown-Formatierung erlaubt
Formular-Optionen