2017 © Pedro Peláez
 

yii2-extension yii2-clean-vendors

Clean composer vendor/ directory by removing docs, tests, gits, etc

image

mbrowniebytes/yii2-clean-vendors

Clean composer vendor/ directory by removing docs, tests, gits, etc

  • Thursday, December 21, 2017
  • by browniebytes
  • Repository
  • 1 Watchers
  • 2 Stars
  • 189 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 8 % Grown

The README.md

Yii2 command extension to clean composer's vendor/ directory

This extension removes docs, tests, gits, etc from composer's vendor/ directory, (*1)

It is based on barryvdh/composer-cleanup-plugin, (*2)

The format of the rules and the removal logic have been copied., (*3)

The main changes are: - Callable as a Yii2 command - Provides progress feedback - Default rule added, (*4)

Installation

The preferred way to install this extension is through composer., (*5)

Either run, (*6)

php composer.phar require mbrowniebytes/yii2-clean-vendors:dev-master

or add, (*7)

"mbrowniebytes/yii2-clean-vendors": "dev-master"

to the require section of your composer.json., (*8)

Usage

To use this extension, add the following code in your application configuration (console.php):, (*9)

'controllerMap' => [
    'clean-vendors' => [
        'class' => 'mbrowniebytes\yii2cleanvendors\CleanVendorsController',
    ],
],

Then call the extension from the command line, (*10)

/path/yii> php yii clean-vendors
Checking vendor/ to remove docs, gits, tests, etc ..
Checking 56 vendor packages ..
Done. Scanned 25 vendor packages, cleaned 10 files/dirs

or add the extension to the composer scripts section to always clean vendors, (*11)

    "scripts": {
        "post-update-cmd": [
            "php yii clean-vendors"
        ]
    },

Additional arguments

-dry-run    do not delete anything
-verbose    echo rules being run, dir/file being deleted
-silent     do not echo anything

The Versions

21/12 2017

dev-master

9999999-dev

Clean composer vendor/ directory by removing docs, tests, gits, etc

  Sources   Download

MIT

The Requires

 

composer yii2 clean vendor