-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vendor_compress.dist
27 lines (25 loc) · 1.27 KB
/
.vendor_compress.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
declare(strict_types=1);
use Donatorsky\VendorCompress\Config;
use Donatorsky\VendorCompress\FileFilters\BasenameFilter;
use Donatorsky\VendorCompress\FileFilters\BasenameRegexFilter;
use Donatorsky\VendorCompress\FileFilters\ExtensionFilter;
use Donatorsky\VendorCompress\FileFilters\IsDirectoryFilter;
use Donatorsky\VendorCompress\FileFilters\IsFileFilter;
use Donatorsky\VendorCompress\FileFilters\VendorPackageFilter;
use Donatorsky\VendorCompress\FileProcessors\MinifyJsonFileProcessor;
use Donatorsky\VendorCompress\FileProcessors\StripWhitespacesPhpFileProcessor;
return Config::create()
->setFilesCompressionMethod(Phar::NONE)
->setArchiveCompressionMethod(Phar::NONE)
->setExcluded([
new VendorPackageFilter('donatorsky', 'vendor-compress'),
new IsDirectoryFilter(new BasenameFilter('docs')),
new IsDirectoryFilter(new BasenameFilter('tests')),
new IsFileFilter(new BasenameFilter('composer.json')),
new IsFileFilter(new BasenameFilter('composer.lock')),
new IsFileFilter(new BasenameFilter('.gitignore')),
new IsFileFilter(new BasenameRegexFilter('/^(?:README|CHANGELOG|phpunit.*\.xml.*$)/i')),
])
->addFileProcessor(new MinifyJsonFileProcessor(), new ExtensionFilter('json'))
->addFileProcessor(new StripWhitespacesPhpFileProcessor(), new ExtensionFilter('php'));