infinum / eightshift-libs

Library that is meant to be used inside Eightshift Boilerplate and Eightshift Boilerplate Plugin libs via composer in order to be able to easily set up a modern development process.
https://eightshift.com
MIT License
62 stars 11 forks source link

[BUG] - InitSetup folder adds 44.5MB of extra 'stuff' to the libs #441

Open dingo-d opened 3 weeks ago

dingo-d commented 3 weeks ago

Not sure if you're aware but the folder InitSetup you've added to it increased the libs size by a huge amount.

From what I see, these are only CLI commands, so it would be cool if, when running composer install --no-dev (production build), this folder would be excluded from bundling, as it's not important for the production build of any theme/plugin.

I only noticed this because I went to update a plugin, and noticed that my zip size went from 12MB to 28MB, which was super suspicious.

mbmjertan commented 3 weeks ago

This seems to be the theme initializer (boilerplate), so makes sense to exclude from --no-dev installs

dingo-d commented 2 weeks ago

I don't think there are script events that target --no-dev install, but there is post-autoload-dump, which could be used to trigger some script that will clean any file that is not needed for production?