PHPackages                             figdice/asseteer - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. figdice/asseteer

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

figdice/asseteer
================

Post-install resource copy script for Composer

213.0k↓100%3[1 PRs](https://github.com/gabrielzerbib/asseteer/pulls)PHP

Since Oct 9Pushed 7y agoCompare

[ Source](https://github.com/gabrielzerbib/asseteer)[ Packagist](https://packagist.org/packages/figdice/asseteer)[ RSS](/packages/figdice-asseteer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Asseteer
========

[](#asseteer)

*A configurable post-install Composer hook, to copy external resources to public HTTP location of your PHP project*

Why
---

[](#why)

Your PHP application uses external static resources (js/css/images/fonts) that are publicly available (eg. jQuery, Bootstrap etc.). You can use Composer to handle the static files as regular dependencies of your project, but you need to place them inside your HTTP root tree, rather than their Composer vendor location.

Asseteer is a dependency for yor project, that you can invoke at "composer install" goal, in order to perform the file-copy operations.

How
---

[](#how)

You pilot Asseteer from the `composer.json` file:

- Declare the external files to download, as regular `require` dependencies.
- Optionally define their specifics (URL to download) in the `repositories` section.
- Then, configure the copy operations in the `extra` section.
- Finally, invoke the `post-install-cmd` hook in `scripts` section.

##### `require` section

[](#require-section)

First, include `figdice/asseteer` as a dependency of your project, in order to activate the post-install hook.

```
  "require": {
    "figdice/asseteer": "dev-master",
    ...
    "static-assets/jquery": "2.1.3",
    "static-assets/bootstrap-css": "3.3.5",
    "static-assets/bootstrap-js": "3.3.5",
    ...
  }
```

Now, suppose the HTML files in your application use jQuery and Bootstrap: list your static public dependencies, one by one. `"static-assets"` is used arbitrarily in this example. It is simply the virtual vendor folder name for your asset files, where Composer will download them.

##### `repositories` section

[](#repositories-section)

Most of the time, your remote static files (eg. the standard minified jquery) are not available as Packagist/Composer packages. You have to tell Composer to download them explicitly:

```
  "repositories":[
    ...
    {
      "type": "package",
      "package": {
        "name": "static-assets/jquery",
        "version": "2.1.3",
        "dist": {
          "url": "http://code.jquery.com/jquery-2.1.3.min.js",
          "type": "file"
        }
      }
    },
    ...
  ]
```

The above directive will make Composer download the file specified in `url` property, and which will end up in the `vendor/static-assets/jquery` folder of your project.

Repeat the `require` declaration and `repositories` items for each external asset dependency.

##### `extra` section

[](#extra-section)

```
  "extra": {
    "post-install-asseteer": [
      {
        "vendor": "static-assets",
        "target": "app/http/js",
        "filters": [ "\\.js$" ]
      },{
        "vendor": "static-assets",
        "target": "app/http/css",
        "filters": [ "\\.css$" ]
      },
      ...
    ]
  }
```

Specify the `post-install-asseteer` extra section, which is a array of recursive filtered copy directives. Each item specifies:

- a `vendor` subfolder where Composer downloaded the files,
- a `target` property which is your public HTTP folder where you want to make the static assets available for browsing,
- and a `filters` array of reg exp patterns to include in the copy.

##### `scripts` section

[](#scripts-section)

This is where you plug Asseteer as a hook in the Composer lifecycle.

```
  "scripts" :{
    "post-install-cmd": [
      "asseteer\\AssetInstaller::postInstall"
    ]
  }
```

More
----

[](#more)

Sometimes you need to download several files from the same package (for example, the CSS and various Font files from [Foundation Icon Font 3](http://zurb.com/playground/foundation-icon-fonts-3)). Currently, Composer does not support to group the files in a single Dist Package.

You can use Asseteer to do the job, with the help of an `extra` property in the package definition in `repositories`:

```
  "repositories": [
    {
      "type": "package",
      "package": {
        "name": "tradonline-assets/foundation-icons",
        "version": "3.0.0",
        "dist": {
          "url": "http://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.css",
          "type": "file"
        },
        "extra": {
          "asseteer": [
            "http://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.woff",
            "http://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.ttf"
          ]
        }
      }
    }
  ]
```

Then you need to hook the `post-update-cmd` event in the `scripts` section of `composer.json`:

```
  "scripts" :{
    "post-update-cmd": [
      "asseteer\\AssetInstaller::postUpdate"
    ],
    "post-install-cmd": [
      "asseteer\\AssetInstaller::postInstall"
    ]
  }
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7f857232e89d8c2b3d7f4f60b64ae59f76c0a78e7c0002103d2efd39c5bdcf9?d=identicon)[figdice](/maintainers/figdice)

---

Top Contributors

[![zzgab](https://avatars.githubusercontent.com/u/3754439?v=4)](https://github.com/zzgab "zzgab (9 commits)")

### Embed Badge

![Health badge](/badges/figdice-asseteer/health.svg)

```
[![Health](https://phpackages.com/badges/figdice-asseteer/health.svg)](https://phpackages.com/packages/figdice-asseteer)
```

###  Alternatives

[deployer/deployer

Deployment Tool

11.1k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

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