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(4y ago)303.8M—3.6%2[1 issues](https://github.com/pixelfear/composer-dist-plugin/issues)[1 PRs](https://github.com/pixelfear/composer-dist-plugin/pulls)20MITPHP

Since Nov 25Pushed 8mo 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 1mo 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 93% of packages

Maintenance41

Moderate activity, may be stable

Popularity52

Moderate usage in the ecosystem

Community28

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

1820d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9438fee7f6e8c043056c273ed3e445c9d92c525e91604b425d5df2d26cbca517?d=identicon)[pixelfear](/maintainers/pixelfear)

---

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

[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.

2994.3M16](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[olvlvl/composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes

184108.8k8](/packages/olvlvl-composer-attribute-collector)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)

PHPackages © 2026

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