dg/composer-cleaner

Victor The Cleaner:从vendor目录中删除不必要的文件。

安装次数 1,414,736

依赖项: 28

建议者: 0

安全: 0

星标: 133

关注者: 15

分支: 19

开放问题: 7

类型:composer-plugin

v2.2.1 2022-04-02 16:11 UTC

This package is auto-updated.

Last update: 2024-08-30 01:14:02 UTC


README

Downloads this Month Tests

此工具从Composer vendor 目录中删除不必要的文件和目录。

清理器仅保留包含使用库所需源文件的目录。这些目录根据每个已安装库中的 composer.json 文件的 autoload部分 定位。相反,例如,测试文件是不需要使用的文件,因此会被删除。

安装

composer require dg/composer-cleaner

然后简单地运行 composer updatecomposer require ...,当安装新的库时,清理器会自动删除不必要的文件。

配置

某些库还需要其他文件/目录,清理器认为它们是不必要的。在这种情况下,您可以在配置中列出它们(指定要忽略的路径),工具将保留它们。或者,您可以指定某些库不应完全清理。

简单地将 extra > cleaner-ignore 部分添加到 composer.json 文件中

{
	"extra": {
		"cleaner-ignore": {
			"slevomat/eet-client": [  // name of package
				"wsdl*"               // list of files or subdirectories, you can use wildcards `*` and `?`
			],

			"mpdf/mpdf": true         // ignores whole package
		}
	}
}

支持项目

你喜欢Victor The Cleaner吗?你期待新功能吗?

Donate