PHPackages                             pixelfear/composer-dist-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pixelfear/composer-dist-plugin

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

pixelfear/composer-dist-plugin
==============================

Downloads distributable assets to be used in packages so you don't have to commit them.

v0.1.6(5y ago)304.3M↓27.4%2[1 issues](https://github.com/pixelfear/composer-dist-plugin/issues)[1 PRs](https://github.com/pixelfear/composer-dist-plugin/pulls)20MITPHPCI failing

Since Nov 25Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/pixelfear/composer-dist-plugin)[ Packagist](https://packagist.org/packages/pixelfear/composer-dist-plugin)[ GitHub Sponsors](https://github.com/jasonvarga)[ RSS](/packages/pixelfear-composer-dist-plugin/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (4)Versions (9)Used By (20)

Composer Dist Plugin
====================

[](#composer-dist-plugin)

A [Composer](https://getcomposer.org) plugin that allows zip files containing distributable assets to be downloaded and extracted within a package's directory when it's installed.

Useful for packages that need to ship compiled css/js files but don't want to track them within git.

> **Note**: This just downloads and extracts the zip.
> It doesn't compile or create them. To do that, check the the [Prerequisites](#prerequisites) section below.

Example
-------

[](#example)

Suppose you publish a PHP package `foo/bar` which expects your compiled dist assets to be located in `resources/dist`. Place this configuration in the `composer.json` for `foo/bar`:

```
{
  "name": "foo/bar",
  "require": {
    "pixelfear/composer-dist-plugin": "dev-master"
  },
  "extra": {
    "download-dist": {
      "url": "https://github.com/foo/bar/releases/download/{$version}/dist.tar.gz",
      "path": "resources/dist"
    }
  }
}
```

Prerequisites
-------------

[](#prerequisites)

This plugin only downloads and extracts an existing zip from a URL. You will need to create the zip yourself.

A good solution for this could be using a GitHub Actions workflow.

For example, [this workflow](examples/github-workflow.yml) will do the following steps whenever you push a tag starting with `v`:

- Checkout your code using Git
- Run npm install
- Compile assets using Laravel Mix
- Create a tar.gz archive
- Create a GitHub release
- Upload the tar to the release

Of course, this means that archives will only exist for tagged releases. If you are installating a package using a branch like dev-master, the zip will 404. In this case you can manually compile your assets locally.

Configuration
-------------

[](#configuration)

### Multiple bundles

[](#multiple-bundles)

In the example above, a single zip (bundle) is used. However, you may configure multiple bundles to be downloaded by providing an array of bundle objects.

```
  "extra": {
    "download-dist": [
      {
        "url": "...",
        "path": "dist/one",
      },
      {
        "url": "...",
        "path": "dist/two"
      }
    ]
  }
```

### Bundle options

[](#bundle-options)

For each bundle, the following options are available:

OptionDescriptionurlThe URL of the zip to download. Supports `zip`, `tar`, or `tar.gz` files. You can include `{$version}` in the URL which will be replaced by the version of the package being installed (eg. `v1.0.0`).pathWhere the zip should be extracted relative to your package's root. Defaults to `dist`.nameName of the bundle which will be displayed in the Composer output. Defaults to `dist`.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity53

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~90 days

Recently: every ~135 days

Total

7

Last Release

1866d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/105211?v=4)[Jason Varga](/maintainers/jasonvarga)[@jasonvarga](https://github.com/jasonvarga)

---

Top Contributors

[![jasonvarga](https://avatars.githubusercontent.com/u/105211?v=4)](https://github.com/jasonvarga "jasonvarga (16 commits)")[![exussum12](https://avatars.githubusercontent.com/u/1102850?v=4)](https://github.com/exussum12 "exussum12 (1 commits)")[![jesseleite](https://avatars.githubusercontent.com/u/5187394?v=4)](https://github.com/jesseleite "jesseleite (1 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pixelfear-composer-dist-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/pixelfear-composer-dist-plugin/health.svg)](https://phpackages.com/packages/pixelfear-composer-dist-plugin)
```

###  Alternatives

[symfony/runtime

Enables decoupling PHP applications from global state

74798.8M1.0k](/packages/symfony-runtime)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M564](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2124.7M203](/packages/drupal-core-project-message)[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

3014.6M26](/packages/vaimo-composer-patches)[sandersander/composer-link

Adds ability to link local packages for development with composer

98457.9k](/packages/sandersander-composer-link)[phpro/grumphp-shim

GrumPHP Phar distribution

294.7M340](/packages/phpro-grumphp-shim)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
