Skip to content

Commit

Permalink
Minimize .phar size (#4860)
Browse files Browse the repository at this point in the history
* Minimize .phar size

- docs and examples not useful out of phar
- apply GZ compression, zlib is PHP requirement
- clean-up extra files from vendor

* Update phar:build to use compile instead of build
  • Loading branch information
andypost committed Jan 3, 2022
1 parent 21762cc commit 47a90a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions box.json.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@
"alias": "drush.phar",
"chmod": "0755",
"compactors": [],
"directories": ["commands", "docs", "examples", "includes", "lib", "src", "misc"],
"files": ["drush.api.php", "drush.complete.sh", "drush.info", "drush.launcher", "drush.php", "drush_logo-black.png", "README.md"],
"compression": "GZ",
"directories": ["commands", "includes", "lib", "src", "misc"],
"blacklist": [
"windrush_build/",
"Internal/Symfony/",
"TestTraits/"
],
"files": ["drush.complete.sh", "drush.info", "drush.launcher", "drush.php"],
"finder": [
{
"name": "*.php",
"exclude": [
"examples",
"isolation",
"phing",
"test",
"tests",
"test_old",
"Test",
"Tests",
"Tester"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
},
"scripts": {
"phar:install-tools": "curl -LSs https://box-project.github.io/box2/installer.php | php",
"phar:build": "php box.phar build",
"phar:build": "php box.phar compile",
"lint": [
"find includes -name '*.inc' -print0 | xargs -0 -n1 php -l",
"find lib/Drush -name '*.php' -print0 | xargs -0 -n1 php -l"
Expand Down

0 comments on commit 47a90a3

Please sign in to comment.