PHPackages                             frontpack/composer-assets-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. frontpack/composer-assets-plugin

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

frontpack/composer-assets-plugin
================================

Composer plugin for installing of assets.

v1.0.0(10mo ago)2733.6k↓30.8%5[3 issues](https://github.com/frontpack/composer-assets-plugin/issues)5BSD-3-ClausePHPPHP 8.0 - 8.4

Since Dec 27Pushed 10mo ago2 watchersCompare

[ Source](https://github.com/frontpack/composer-assets-plugin)[ Packagist](https://packagist.org/packages/frontpack/composer-assets-plugin)[ Fund](https://www.janpecha.cz/donate/composer-assets-plugin/)[ RSS](/packages/frontpack-composer-assets-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (1)Versions (12)Used By (5)

Composer Assets Plugin
======================

[](#composer-assets-plugin)

[![Downloads this Month](https://camo.githubusercontent.com/de63af597e4fbcf6a46d75c82c21c4f2ef1b720ce00f422b9861d08dc8096e2e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f66726f6e747061636b2f636f6d706f7365722d6173736574732d706c7567696e2e737667)](https://packagist.org/packages/frontpack/composer-assets-plugin)[![Latest Stable Version](https://camo.githubusercontent.com/8ecc259a093456f142e8ddfe82a6fcc7ce1de7471456ad61d39726b1e0edeb25/68747470733a2f2f706f7365722e707567782e6f72672f66726f6e747061636b2f636f6d706f7365722d6173736574732d706c7567696e2f762f737461626c65)](https://github.com/frontpack/composer-assets-plugin/releases)[![License](https://camo.githubusercontent.com/fa7d5fcf2c84b580327af52da95dd751703af65f079dc3c5a0081beac0789718/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4e65772532304253442d626c75652e737667)](https://github.com/frontpack/composer-assets-plugin/blob/master/license.md)

Composer plugin for installing assets.

[![Donate](https://camo.githubusercontent.com/101b981194f1dafbf9c42e19c3034fe2d724e75be972cef0f4477074997834db/68747470733a2f2f6275796d65636f666665652e696e746d2e6f72672f696d672f646f6e6174652d62616e6e65722e76312e737667)](https://www.janpecha.cz/donate/composer-assets-plugin/)

Installation
------------

[](#installation)

Use [Composer](http://getcomposer.org/):

```
composer require frontpack/composer-assets-plugin

```

Library requires PHP 8.0 or later.

Commands
--------

[](#commands)

- `composer refresh-assets` - refresh files in `assets` directory

Assets configuration
--------------------

[](#assets-configuration)

### Packages

[](#packages)

- `assets-files` in section `extra`
    - `true` - symlinks whole package directory
    - file path - symlinks one file or content of directory
    - list of file paths - symlinks files/directories

Example:

```
{
	"extra": {
		"assets-files": [
			"static/plugin.js",
			"static/plugin.css",
			"static/icons.png"
		]
	}
}
```

- `static/plugin.js` - symlinks file to `assets/org/package/plugin.js`
- `static/plugin.css` - symlinks file to `assets/org/package/plugin.css`
- `static/icons.png` - symlinks file to `assets/org/package/icons.png`

Or you can use simple:

```
{
	"extra": {
		"assets-files": "static"
	}
}
```

with same result.

### Root package

[](#root-package)

- `assets-dir` - directory for installing of assets, default `assets`, relative to `vendor-dir`
- `assets-directory` - alias for `assets-dir`
- `assets-files` - list of asset files in incompatible packages, it overrides `assets-files` from installed packages
- `assets-strategy` - install strategy for assets
    - `auto` - select strategy by platform (default value)
    - `copy` - copy all assets, default strategy on Windows
    - `symlink` - create relative symlinks, default strategy on non-Windows platforms
- `assets-target` - target directory for specific packages, relative to `vendor-dir`, must be out of `assets-dir`

Example:

```
{
	"extra": {
		"assets-dir": "public",
		"assets-files": {
			"org/package": true,
			"org/package2": "js/calendar.js",
			"org/package3": [
				"static/plugin.js",
				"static/plugin.css",
				"static/icons.png"
			]
		},
		"assets-target": {
			"ckeditor/ckeditor": "admin/wysiwyg"
		}
	}
}
```

- `org/package` - symlinks whole package directory to `public/org/package`
- `org/package2` - symlinks file `js/calendar.js` to `public/org/package2/calendar.js`
- `org/package3`
    - `static/plugin.js` - symlinks file to `public/org/package3/plugin.js`
    - `static/plugin.css` - symlinks file to `public/org/package3/plugin.css`
    - `static/icons.png` - symlinks file to `public/org/package3/icons.png`
- `ckeditor/ckeditor` - symlinks files to `admin/wysiwyg`

Default mapping
---------------

[](#default-mapping)

Plugin provides default mapping for selected incompatible packages. You can override this mapping in your `composer.json`.

List of packages with default mapping:

- `bower-asset/tiny-slider`
- `ckeditor/ckeditor`
- `components/jquery`
- `enyo/dropzone`
- `nette/forms`
- `o5/grido`

Where find supported packages?
------------------------------

[](#where-find-supported-packages)

Some libraries and packages support Composer by default. For other exists shim-repositories:

-
-

Always you can search packages on [Packagist](https://packagist.org/).

---

License: [New BSD License](license.md)
Author: Jan Pecha,

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance51

Moderate activity, may be stable

Popularity38

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.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 ~309 days

Recently: every ~479 days

Total

11

Last Release

329d ago

Major Versions

v0.11.1 → v1.0.02025-06-20

PHP version history (3 changes)v0.9.0PHP &gt;=5.4.0

v0.10.0PHP &gt;=5.6.0

v1.0.0PHP 8.0 - 8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c980b1511b4a0350442dc23d89c99d4d9a2411b7e765d52c133ccacf616968b?d=identicon)[janpecha](/maintainers/janpecha)

---

Top Contributors

[![janpecha](https://avatars.githubusercontent.com/u/637719?v=4)](https://github.com/janpecha "janpecha (35 commits)")[![pdima88](https://avatars.githubusercontent.com/u/2329196?v=4)](https://github.com/pdima88 "pdima88 (1 commits)")

---

Tags

assetscomponentscomposer-pluginfrontendfrontend-assets

### Embed Badge

![Health badge](/badges/frontpack-composer-assets-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/frontpack-composer-assets-plugin/health.svg)](https://phpackages.com/packages/frontpack-composer-assets-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)
