Download the PHP package savinmikhail/dist-size-optimizer without Composer

On this page you can find all versions of the php package savinmikhail/dist-size-optimizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dist-size-optimizer

Dist Size Optimizer

A command-line tool that helps you optimize your package distribution size by automatically managing .gitattributes export-ignore rules.

Note: This package was previously known as export-ignore-check. The functionality remains the same, but the name better reflects its purpose of optimizing distribution size.

Why?

When you publish a package to Packagist, Composer creates a distribution archive using git archive. Files and directories that are not needed in production (like tests, documentation, CI configs) should be excluded using .gitattributes export-ignore to:

This tool helps you identify what should be excluded and can automatically fix your .gitattributes file.

Installation

  1. As composer dependency:

  2. Or as standalone phar package:

Usage

Check Current Project

To check your current project (recommended during development):

This will:

  1. Create a git archive of your project (simulating Packagist's distribution)
  2. Scan for files that should be excluded
  3. Show you what to add to your .gitattributes file
  4. Automatically append the suggested patterns to your .gitattributes file

Note: When checking your current project, the tool uses git archive HEAD, which means it only includes committed changes. Make sure to commit your changes before running the check to get accurate results.

Check Any Package

To check any package from Packagist:

For example:

Clean .gitattributes

If your .gitattributes file contains stale export-ignore entries copied from other projects, you can remove all non-existent paths with:

This command will:

  1. Read your existing .gitattributes file
  2. Remove all lines with export-ignore patterns that no longer match any file or directory in the project
  3. Overwrite .gitattributes with the cleaned content

Output Options

Dry Run

By default, the tool will automatically append suggested patterns to your .gitattributes file. Use --dry-run to only see what would be added without making any changes:

JSON Output

Add --json flag to get machine-readable output:

Custom Config

By default, the tool uses a predefined set of patterns to check. You can provide your own config file:

The config file should be a PHP file that returns an array of patterns to check:

Custom Working Directory

By default, the tool uses a system temporary directory for working directory. You can provide your own working directory path:

Example Output

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.


All versions of dist-size-optimizer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
symfony/console Version ^7.2
symfony/finder Version ^7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package savinmikhail/dist-size-optimizer contains the following files

Loading the files please wait ....