eghojansu/project-compress

Compress project with PHP and 7zip

dev-master 2021-09-30 12:28 UTC

This package is auto-updated.

Last update: 2024-04-29 04:47:30 UTC


README

Compress project folder

Installation and Usage

composer require --dev eghojansu/project-compress:dev-master

Use in your project: vendor/bin/compress

Options

Create compress.json or compress.json.dist in current working directory.

Default options:

{
    "bin": null,
    "dest": "{cwd}/dist",
    "dir": "{cwd}",
    "exclude_extensions": ["7z", "bak", "db", "env", "gz", "zip", "rar"],
    "exclude_recursives": ["~$*"],
    "exclude_extras": null,
    "excludes": [".git", ".vs", "dist", "node_modules", "var", "vendor"],
    "extension": null,
    "format": "7z",
    "name": null,
    "options": "-mx=9 -m0=lzma2",
    "overrides": null
}

Please refers to 7zip for format and options option.

Overrides consists of environment and overriden option as below.

{
    "overrides": {
        "prod": {
            "exclude_extras": "exclude/other/directory-or-files"
        }
    }
}

Then run command with vendor/bin/compress --env=prod. The configuration in overrides.prod will be merged with the main configuration.

Supported compressor