liborm85 / composer-vendor-cleaner

Composer Vendor Cleaner removes unnecessary development files and directories from vendor directory.
MIT License
27 stars 3 forks source link

[Feature request] Only clean on --no-dev install #2

Closed marcoliverteschke closed 3 years ago

marcoliverteschke commented 3 years ago

Hi,

I'd like to suggest an extension of the plugin. Currently the plugin is executed after every package installation. But when I'm developing, I might want to look at a package's tests for reference. So I'd suggest the following:

  1. Add a boolean flag to the plugin config in composer.json, something like "skip-during-dev" or "no-dev-only"
  2. If that flag is present and set to true, start the cleanup task only if the composer command is run with --no-dev
liborm85 commented 3 years ago

Feature implemented by commit https://github.com/liborm85/composer-vendor-cleaner/commit/39b9ca4875152501469efb039bcdcb1042f1524d, created new no-dev-only setting. You can test it, and then I release new version.

marcoliverteschke commented 3 years ago

Works like a charm! Thank you!

liborm85 commented 3 years ago

Released as version 1.5.0. Thanks.