alareis/composer-cleanup

Installs: 294

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:composer-plugin

0.2.0 2021-03-29 17:21 UTC

This package is auto-updated.

Last update: 2024-04-29 04:15:31 UTC


README

Delete unnecessary file from the vendor dir. Based on composer-cleanup-plugin by barryvdh.

Note: This package is still experimental, usage in production is not recommended.

Install

Require this package in your composer.json:

  composer global require alareis/composer-cleanup

Usage

This plugin will work automatically on any packages installed as dist. Therefore, if you are using it to build a package archive, simply run composer install with the --prefer-dist option.

Configuration

You can add custom rules in config section of composer file, like this:

"config": {
    "cleanup": {
        "bower-asset/moment-timezone" : [
            "data/unpacked"
        ]
    },
},

What does it do?

For every installed or updated package in the default list, in general:

  1. Remove documentation, such as README files, docs folders, etc.
  2. Remove tests, PHPUnit configs, and other build/CI configuration.
  3. Remove bower ignored files