Skip to content

Commit

Permalink
readme.md: added more info
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 31, 2019
1 parent 91f865f commit ac989d0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ 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)
[![Build Status](https://travis-ci.org/dg/composer-cleaner.svg?branch=master)](https://travis-ci.org/dg/composer-cleaner)

This tool removes unnecessary files and directories from Composer vendor directory.
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
------------
Expand All @@ -13,20 +17,24 @@ Installation
composer require dg/composer-cleaner
```

Then simply use `composer update`.
Then simply run `composer update` or `composer require ...` and the Cleaner automatically removes unnecessary files when new libraries are installed.


Configuration
-------------

You can also specify paths to be ignored (ie they will not be deleted) via `composer.json`:
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*" // files or subdirectories, you can use wildcards `*` and `?`
"wsdl*" // list of files or subdirectories, you can use wildcards `*` and `?`
],

"mpdf/mpdf": true // ignores whole package
Expand Down

0 comments on commit ac989d0

Please sign in to comment.