PHPackages                             soundasleep/asset-discovery - 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. soundasleep/asset-discovery

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

soundasleep/asset-discovery
===========================

0.1.1(11y ago)01432PHP

Since Dec 15Pushed 11y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

asset-discovery
===============

[](#asset-discovery)

*asset-discovery* is a Composer-enabled PHP script to locate assets (JS, CSS, Coffee, SASS, images) across multiple PHP components which then can be copied automatically into generated stylesheets, scripts and image folders.

Based on [component-discovery](https://github.com/soundasleep/component-discovery).

Configuring
-----------

[](#configuring)

First include `asset-discovery` as a requirement in your project `composer.json`, and run `composer update` to install it into your project:

```
{
  "require": {
    "soundasleep/asset-discovery": "dev-master"
  }
}
```

Now create a `asset-discovery.json` in your project, to define the types of assets to discover, and where to place source files:

```
{
  "src": ["vendor/*/*", "core"],
  "js": "site/generated/js/generated.js",
  "coffee": "site/generated/js/generated-coffee.coffee",
  "css": "site/generated/css/generated.css",
  "scss": "site/generated/css/generated-scss.scss",
  "images": "site/generated/images/"
}
```

*asset-discovery* will look in all the `src` folders for files called `assets.json`to find matching assets. Wildcards are supported. For example, in your `vendor/my/package/assets.json`:

```
{
  "scss": ["css/currencies.scss", "css/second.scss"],
  "coffee": ["js/*.coffee"],
  "images": ["images/*"]
}
```

Generated asset files, other than images, will be included in the source order specified.

Building
--------

[](#building)

Run the generate script, either with your build script or manually, with a given root directory:

```
php -f vendor/soundasleep/asset-discovery/generate.php .

```

This will generate various files under the directories defined in your `asset-discovery.json` config. These files can then be passed along to the next step in a build chain (e.g. compile SASS to CSS, minify, spritify, optimize images etc).

TODOs
-----

[](#todos)

1. Actually publish on Packagist
2. More documentation, especially default `asset-discovery.json` parameters
3. Tests
4. Example projects using *asset-discovery*
5. Create `grunt` task `grunt-php-asset-discovery` to wrap the manual PHP command
6. Release 0.1 version

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

4166d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ebbec5ccc867054461adebb7c5b6312f8256f989ef96b124892e6e89724afdb?d=identicon)[soundasleep](/maintainers/soundasleep)

---

Top Contributors

[![soundasleep](https://avatars.githubusercontent.com/u/3889656?v=4)](https://github.com/soundasleep "soundasleep (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/soundasleep-asset-discovery/health.svg)

```
[![Health](https://phpackages.com/badges/soundasleep-asset-discovery/health.svg)](https://phpackages.com/packages/soundasleep-asset-discovery)
```

###  Alternatives

[magepal/magento2-reindex

Reindex your Magento2 store quickly and easily from backend/admin, instead of command line.

112649.7k1](/packages/magepal-magento2-reindex)[ourcodeworld/name-that-color

A non-official PHP port of the NTC JS library to find out the name of the closest matching color.

37163.5k](/packages/ourcodeworld-name-that-color)[redberry/mcp-client-laravel

Package that enables you access to any mcp server that you define in the config

1345.0k1](/packages/redberry-mcp-client-laravel)[nylle/php-automapper

271.4k](/packages/nylle-php-automapper)

PHPackages © 2026

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