lemric/composer-cleaner

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

安装: 495

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 0

分支: 19

类型:composer-plugin

dev-master 2024-08-16 07:52 UTC

This package is auto-updated.

Last update: 2024-09-16 07:55:59 UTC


README

Downloads this Month Tests

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

清理器只留下包含使用库所需源文件的目录。这些目录根据每个已安装库中composer.jsonautoload部分进行定位。相反,例如,测试文件是不需要的,所以它们会被移除。

安装

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