Download the PHP package babymarkt/composer-cleaner-plugin without Composer
On this page you can find all versions of the php package babymarkt/composer-cleaner-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package composer-cleaner-plugin
composer-cleaner-plugin
- Install
- Configure
- Run
Install
To install the plugin use Composer:
Configure
The configuration must be placed in the extra
section in composer.json
. An example is:
The program contains a default configuration under the context default
(Surprise surprise!).
More detailed information can be found in the class
AbstractCommand
. Run
to use it.
Configuration options
context
Each configuration set is wrapped in a cleaning context. A context is a simple string which can be used on terminal to select the configuration.
pattern
pattern
contains a list of glob
pattern to select files in the project
directory tree. Consult the PHP documentation
or Wikipedia for more information about the glob
function and patterns.
This example searches for files starting with README
or .git
in the complete
project tree.
paths
By default the cleaner command use the project root directory to search files
(the directory that contains the composer.json
file). With the option paths
you can set multiple paths to search for files in instead of the default root
directory. All paths are relative to the root directory, also such starting
with an /
. Paths outside the root are being ommited.
This example searches for files starting with .git
in ./src
and ./vendor
, nowhere else.
exclude
This option allows you to exclude files from deletion. The list consists of
RegEx patterns, without specifying the delimiter characters. The pattern is
applied to the entire path and not only to the file name. The used delimiter
character is the #
. If you need to use it in you pattern, you must escape it.
This example searches for paths starting with data/
and NOT ends with
.important
.
Run
To run the command use composer:
or add a custom script to your composer.json
:
All versions of composer-cleaner-plugin with dependencies
composer-plugin-api Version ^1.1