All Projects → mediamonks → composer-vendor-cleaner

mediamonks / composer-vendor-cleaner

Licence: MIT license
Clean your composer vendor directory

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to composer-vendor-cleaner

Composer Cleaner
Victor The Cleaner: removes unnecessary files from vendor directory
Stars: ✭ 114 (+322.22%)
Mutual labels:  cleaner
prependers
Easily and cleanly extend third-party code.
Stars: ✭ 24 (-11.11%)
Mutual labels:  vendor
readability-cli
A CLI for Mozilla Readability. Get clean, uncluttered, ready-to-read HTML from any webpage!
Stars: ✭ 41 (+51.85%)
Mutual labels:  cleaner
Ltecleanerfoss
The last Android cleaner you'll ever need!
Stars: ✭ 141 (+422.22%)
Mutual labels:  cleaner
automatic-vendor-federation
Utility to enable automatic vendor sharing within bundles using Module Federation
Stars: ✭ 69 (+155.56%)
Mutual labels:  vendor
vue-cli-plugin-dll
Vue CLI 3 plugin for Webpack DllPlugin/DllReferencePlugin
Stars: ✭ 77 (+185.19%)
Mutual labels:  vendor
Skrub
A package to remove junk from Composer installations and trim build sizes.
Stars: ✭ 91 (+237.04%)
Mutual labels:  cleaner
del-webpack-plugin
A file plugin help you remove old files after webpack (v5) bundling
Stars: ✭ 43 (+59.26%)
Mutual labels:  cleaner
composer-cost
Displays cost/size of each composer package installed.
Stars: ✭ 31 (+14.81%)
Mutual labels:  vendor
POS---Point-Of-Sales
Point of sales proof of concept developed using Asp.Net Core 2.2. Features: Customer, Vendor, Product, Purchase Order, Goods Receive, Sales Order, Inventory Transactions and POS form.
Stars: ✭ 120 (+344.44%)
Mutual labels:  vendor
Czkawka
Multi functional app to find duplicates, empty folders, similar images etc.
Stars: ✭ 5,360 (+19751.85%)
Mutual labels:  cleaner
Cleanmgrplus
🐾 A Improved Replacement for Microsoft Disk Cleanup
Stars: ✭ 224 (+729.63%)
Mutual labels:  cleaner
Govendor
Use Go Modules.
Stars: ✭ 4,989 (+18377.78%)
Mutual labels:  vendor
Cleanexpert
A cleaner app for android
Stars: ✭ 120 (+344.44%)
Mutual labels:  cleaner
gopherpit
Take control of your Go packages' import paths
Stars: ✭ 62 (+129.63%)
Mutual labels:  vendor
Clean Me
A macOS system analyser and cleaner
Stars: ✭ 1,346 (+4885.19%)
Mutual labels:  cleaner
go-project-template
A template for new Go projects.
Stars: ✭ 20 (-25.93%)
Mutual labels:  vendor
Cleaner 42
Only for 42Network schools, Cleaner_42 script is linked to cclean command/program, and it saves you some memory space.
Stars: ✭ 186 (+588.89%)
Mutual labels:  cleaner
XTR-Toolbox
🛠 Versatile tool to optimize Windows
Stars: ✭ 138 (+411.11%)
Mutual labels:  cleaner
removedupes
Remove Duplicate Messages
Stars: ✭ 52 (+92.59%)
Mutual labels:  cleaner

Total Downloads Latest Stable Version Latest Unstable Version License

MediaMonks Composer Vendor Cleaner

Sometimes there are still some unfortunate cases when you need to send your vendor dir to some place and you want it to go as fast as possible. This package provides a simple script which will try to remove as much stuff as possible without breaking your app.

Don't forget to run composer install with --no-dev when creating a package for non-development environments, it will already save you loads space and files if you have packages defined in require-dev!

How it works

The script simply reads all package dirs within the vendor dir (<vendor>/<package>) and removed files from that dir which are not used for running your project. For most packages this means it will remove docs and tests but also the composer files, licenses and readme's.

Since not all packages can be cleaned the same way the type in composer.json of the package is used to determine the cleaning handler.

Currently these handlers are available:

SymfonyBundleHandler

Used when the type is set to symfony-bundle, removes the Tests dir if it's present

DefaultHandler

For all other types, removes all folders except the ones that are defined in the autoload section of the composer.json

Usage

Clean up current vendor dir:

php vendor/mediamonks/composer-vendor-cleaner/bin/clean

Clean up specific vendor dir:

php vendor/mediamonks/composer-vendor-cleaner/bin/clean --dir /path/to/different/vendor/

To just view what it will do without removing the actual files you can do a dry run:

php vendor/mediamonks/composer-vendor-cleaner/bin/clean --dry-run

Options

You pass the location of a json file to set some options which can influence the cleaning process:

php vendor/mediamonks/composer-vendor-cleaner/bin/clean --options /path/to/options.json

The current supported options are:

  • Excluding entire packages
  • Excluding specific dirs for a package
  • Excluding specific files for a package

You can simply look at the provided options.json (which is used by default) to see how the options are defined.

Disclaimer

This script is under development and is not tested extensively yet so use at your own risk!

We can use your help!

This script was mainly created to clean up Symfony Framework projects but with your help we can make it work for other frameworks too. Please create your own handlers, improve the cleaning on current handlers and send in a PR.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].