barryvdh / composer-cleanup-plugin

Composer plugin for cleaning up unused files from packages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a catch all rule which will use a default rule

mbrowniebytes opened this issue · comments

The catch all rule would clean all other packages which do not match an existing rule, by using a default rule; such as array($docs, $tests)
This would allow all packages to be cleaned

+1

Building upon this idea:

Why not add something to the composer.json file so that specific folders/files matching a rule get cleaned up?, for example (regex matching):

{
    "cleanup": {
        "files": [".*/(readme|changelog|license|phpunit.*)(\\.(md|txt|rst))?"],
        "directories":[".*/(test|doc)s?$"]
    }
}

Some are safe, but tests are not by default safe to delete, because some autoload/extend them.