khs1994/phar-builder

v20.10.15 2020-10-15 05:47 UTC

This package is auto-updated.

Last update: 2024-09-15 14:32:40 UTC


README

创建一个基于 Composer 的 PHP 应用程序的 Phar (PHp ARchive) 文件

安装

Composer

composer require macfja/phar-builder

Phar 存档

您可以直接在 GitHub 的发布部分下载 Phar(https://github.com/MacFJA/PharBuilder

使用方法

在基于 composer 的项目中

vendor/bin/phar-builder

使用 Phar

phar-builder.phar package path-to-your-composer.json-file

命令 package

vendor/bin/phar-builder help package 命令中提取

Description:
  Generate a Phar from a composer.json

Usage:
  package [options] [--] [<composer-json>]

Arguments:
  composer-json                  The path to the composer.json file.
                                 If the argument is not defined, search of a composer.json inside the current directory

Options:
      --output=OUTPUT            Where to output the Phar
      --name=NAME                The name of the Phar
      --no-dev                   Do not include dev dependencies
      --dev                      Include dev dependencies
      --no-shebang               Do not add/remove shebang
      --shebang                  Ensure that a shebang is used
      --entry-point=ENTRY-POINT  The file to include when the Phar is executed/called
      --included=INCLUDED        The list (separate by ",") of path to add in the Phar
      --excluded=EXCLUDED        The list (separate by ",") of path to exclude in the Phar
      --bz2                      Use the BZip2 compression for the Phar
      --gzip                     Use the GZip compression for the Phar
      --flat                     Do not compress the Phar
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

有关 Composer 配置的更多信息

类似项目

许可证

MIT 许可证(MIT)。请参阅 许可证文件 了解更多信息。