Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dg/composer-cleaner
Victor The Cleaner: removes unnecessary files from vendor directory
https://github.com/dg/composer-cleaner
cleaner composer composer-plugin php
Last synced: 21 days ago
JSON representation
Victor The Cleaner: removes unnecessary files from vendor directory
- Host: GitHub
- URL: https://github.com/dg/composer-cleaner
- Owner: dg
- Created: 2015-01-05T13:46:29.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-04-02T16:13:30.000Z (over 2 years ago)
- Last Synced: 2024-10-30T05:23:10.349Z (about 1 month ago)
- Topics: cleaner, composer, composer-plugin, php
- Language: PHP
- Homepage: https://nette.org
- Size: 40 KB
- Stars: 134
- Watchers: 14
- Forks: 19
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
Awesome Lists containing this project
- awesome-composer - Composer-Cleaner - The tool removes unnecessary files and directories from the vendor directory. (Plugins / Support)
README
Victor The Cleaner for Composer
===============================[![Downloads this Month](https://img.shields.io/packagist/dm/dg/composer-cleaner.svg)](https://packagist.org/packages/dg/composer-cleaner)
[![Tests](https://github.com/dg/composer-cleaner/workflows/Tests/badge.svg?branch=master)](https://github.com/dg/composer-cleaner/actions)This tool removes unnecessary files and directories from Composer `vendor` directory.
The Cleaner leaves only directories containing the source files needed to use the libraries.
These are located according to the [autoload section](https://getcomposer.org/doc/04-schema.md#autoload) of `composer.json` in each installed library.
Conversely for example, tests are files that are not needed for use, so they are removed.Installation
------------```
composer require dg/composer-cleaner
```Then simply run `composer update` or `composer require ...` and the Cleaner automatically removes unnecessary files when new libraries are installed.
Configuration
-------------Some libraries also requires other files/directories, which the the Cleaner judged to be unnecessary.
In this case, you can list them (specify paths to be ignored), in the configuration and the tool will keep them.
Or you can specify that some libraries should not be cleaned at all.Simply add a `extra > cleaner-ignore` section to `composer.json` file:
```js
{
"extra": {
"cleaner-ignore": {
"slevomat/eet-client": [ // name of package
"wsdl*" // list of files or subdirectories, you can use wildcards `*` and `?`
],"mpdf/mpdf": true // ignores whole package
}
}
}
```Support Project
---------------Do you like Victor The Cleaner? Are you looking forward to the new features?
[![Donate](https://files.nette.org/icons/donation-1.svg?)](https://nette.org/make-donation?to=composer-cleaner)