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

4171d 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

[m1/env

Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.

6412.0M21](/packages/m1-env)[roave/psalm-html-output

Psalm HTML Output

23312.0k1](/packages/roave-psalm-html-output)[pear/system_daemon

A port of the PEAR class to create Daemons with pure PHP

11139.9k1](/packages/pear-system-daemon)[mateffy/laravel-codebase-mcp

An MCP server to give Cursor, Aider, etc. the ability to introspect your Laravel codebase directly, by querying for your models, views, routes and classes without raw file search.

201.1k](/packages/mateffy-laravel-codebase-mcp)

PHPackages © 2026

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