Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/druidfi/composer-slimmer
Composer Plugin remove obsolete files and folders
https://github.com/druidfi/composer-slimmer
composer composer-plugin
Last synced: 26 days ago
JSON representation
Composer Plugin remove obsolete files and folders
- Host: GitHub
- URL: https://github.com/druidfi/composer-slimmer
- Owner: druidfi
- License: mit
- Created: 2023-04-29T12:22:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-16T04:58:33.000Z (10 months ago)
- Last Synced: 2024-09-30T08:03:58.513Z (about 1 month ago)
- Topics: composer, composer-plugin
- Language: PHP
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Composer Slimmer
[![Run tests](https://github.com/druidfi/composer-slimmer/actions/workflows/tests.yml/badge.svg)](https://github.com/druidfi/composer-slimmer/actions/workflows/tests.yml)
## Plan of Cleanup
- Remove listed folders (so we don't need to search inside them)
- Find all files with patterns e.g. *.{md,txt,rst,dist}
- Make list of files to be removed from found files and listed files
- Remove files
- Report the size of removed files and folders## How to test
Require Plugin in the project and accept plugin:
```console
composer require druidfi/composer-slimmer
```Clean projects vendor and other folders loaded by Composer.
Then test installing with Composer Slimmer plugin (`-v` flag is for verbose output):
```console
composer install -v
```At the end you should see how much space was saved.
## Resources
- [Composer issue #1750](https://github.com/composer/composer/issues/1750)
- [Drupal Clean Package Composer Plugin](https://www.drupal.org/project/clean_package)
- [The Drupal Vendor Hardening Composer Plugin](https://github.com/drupal/core-vendor-hardening)