PHPackages                             aryelgois/composer-front-end - 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. aryelgois/composer-front-end

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aryelgois/composer-front-end
============================

A utility to install front-end files with Composer

v0.1(8y ago)012.4kMITPHPPHP ^7.0

Since Dec 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/aryelgois/composer-front-end)[ Packagist](https://packagist.org/packages/aryelgois/composer-front-end)[ RSS](/packages/aryelgois-composer-front-end/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (3)Used By (0)

> A utility to install front-end files with [Composer](https://getcomposer.org/)

Intro
=====

[](#intro)

By default Composer installs all package files under the vendor directory.
It is ok for Composer's main purpose: a tool for dependency management in PHP.

But often, PHP projects involve other languages, like those used in front-end (JavaScript, CSS and their derivatives).

You could use different package managers to deal with each kind of file, but it would be too much work, and I think it is good to have a unified tool.

This is where this package comes in. You will use Composer to fetch repositories containing front-end assets, and this package will symlink them to their appropriate directory.

Install
=======

[](#install)

Run this inside your project:

`composer require aryelgois/composer-front-end`

> In order to avoid Composer warnings during a fresh install, keep the package entry at the beginning of composer.json `require` directive.

Setup
=====

[](#setup)

Add this to your composer.json:

```
{
    "scripts": {
        "post-package-install": "aryelgois\\Composer\\FrontEnd::postPackageInstall",
        "front-end-refresh": "aryelgois\\Composer\\FrontEnd::refresh"
    },
}
```

Now, whenever you install a new package with front-end files, they will be symlinked.

If you already installed some front-end packages, run `composer front-end-refresh` to look in every vendor package.

Config files
============

[](#config-files)

These JSON files are used to tell which files should be symlinked and where.

You could use any key you like for the `file_group`, but it needs to be the same in the vendor config and in your project.

frontend.json
-------------

[](#frontendjson)

Used in vendor packages.

It contains a map of `'file_group': ['file']` of files to be symlinked into your project.
Paths are relative to the vendor package directory.

> not `vendor/`, but `vendor/some/package/`

### Example:

[](#example)

```
{
    "css": "assets/superduperstyle.css",
    "js": [
        "main.js",
        "src/myawesomescript.js"
    ]
}
```

It is possible to specify a single file without an array.

frontend-config.json
--------------------

[](#frontend-configjson)

Used in your project.

It can include the following keys:

#### directories

[](#directories)

*(required)*

A map of `'file_group': 'directory'` to contain symlinks from other packages.
Paths are relative to the root directory.

#### packages

[](#packages)

*(optional)*

A map of `'package/name': files` to be symlinked. The content would be the same as in frontend.json.

Useful when a vendor does not include the frontend.json.

> It replaces the frontend.json

#### structure

[](#structure)

*(optional)*

Defines how the symlinks are placed in the directory of each file\_group:

- **nest**: Symlinks will be created at `vendor/package/`, inside the specified directories. It helps with files with same name.
- **flat**: Symlinks will stay directly inside the defined directories.

#### structure\_default

[](#structure_default)

*(optional)*

Defines the default structure for all directories. If not specified, `nest` is used.

### Example:

[](#example-1)

```
{
    "directories": {
        "css": "public/css",
        "js": "public/js"
    },
    "structure": {
        "css": "flat",
    }
}
```

> `public/` is the Document Root

Notes
=====

[](#notes)

- You still need to manually add the markup to use the symlinked files in your webpage:

    ```

    ```
- Even with `nest`, all symlinks are placed flattened, i.e., the file structure in the vendor package is not preserved.

TODO
====

[](#todo)

- Add path expansion for frontend.json

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3074d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f95855ecc3be665cdac87d201a24f763b0abb9c0fea4297b5f0bab4bff5e3b0?d=identicon)[aryelgois](/maintainers/aryelgois)

---

Top Contributors

[![aryelgois](https://avatars.githubusercontent.com/u/21041013?v=4)](https://github.com/aryelgois "aryelgois (8 commits)")

---

Tags

composerdependency-managerfront-endpackage-managercomposerfront-enddependency managerpackage-manager

### Embed Badge

![Health badge](/badges/aryelgois-composer-front-end/health.svg)

```
[![Health](https://phpackages.com/badges/aryelgois-composer-front-end/health.svg)](https://phpackages.com/packages/aryelgois-composer-front-end)
```

###  Alternatives

[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k289.5M63](/packages/jean85-pretty-package-versions)[fxp/composer-asset-plugin

NPM/Bower Dependency Manager for Composer

8894.8M41](/packages/fxp-composer-asset-plugin)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k37.3M2.1k](/packages/ergebnis-composer-normalize)[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

52722.0M859](/packages/bamarni-composer-bin-plugin)[composer/metadata-minifier

Small utility library that handles metadata minification and expansion.

181115.0M13](/packages/composer-metadata-minifier)[shipmonk/composer-dependency-analyser

Fast detection of composer dependency issues (dead dependencies, shadow dependencies, misplaced dependencies)

6076.7M435](/packages/shipmonk-composer-dependency-analyser)

PHPackages © 2026

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