PHPackages                             vendi-advertising/vendi-asset-loader - 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. vendi-advertising/vendi-asset-loader

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

vendi-advertising/vendi-asset-loader
====================================

Dynamically enqueue CSS and JS files

v4.0.4(1y ago)1584MITPHPPHP ^8.0|^8.1|^8.2|^8.3|^8.4

Since Oct 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/vendi-advertising/vendi-asset-loader)[ Packagist](https://packagist.org/packages/vendi-advertising/vendi-asset-loader)[ RSS](/packages/vendi-advertising-vendi-asset-loader/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (4)Versions (15)Used By (0)

vendi-asset-loader
==================

[](#vendi-asset-loader)

[![PHP Composer](https://github.com/vendi-advertising/vendi-asset-loader/actions/workflows/php.yml/badge.svg)](https://github.com/vendi-advertising/vendi-asset-loader/actions/workflows/php.yml)[![codecov](https://camo.githubusercontent.com/648b1bfbea2033a9519f23f2676b120ba75221ccd15ff3c2e0806cb29ede1d7f/68747470733a2f2f636f6465636f762e696f2f67682f76656e64692d6164766572746973696e672f76656e64692d61737365742d6c6f616465722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/vendi-advertising/vendi-asset-loader)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![Maintainability](https://camo.githubusercontent.com/196b152f20af22b98b6d9166fe1136f2a2a939c0558ef0031dbe537dbfc5da99/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f37326633383461633737303939386661353134372f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/vendi-advertising/vendi-asset-loader/maintainability)

Version 1 was a more complex version that supported multiple loading paths. It has since been rewritten to be much simpler and follow common patterns with less customizations (that were almost never used). Please only use version 2 going forward. You can find the [version 1 documention here](./docs/v1.md).

Install
-------

[](#install)

`composer require vendi-advertising/vendi-asset-loader:^2`

Configure
---------

[](#configure)

The asset loader relies almost completely on the following environment variables.

*NOTE!* This module does not actually perform logic related to `.env` files, it is up to the theme to handle this if needed. Generally speaking, however, you can usually create a file named `.env.local` with these values to override. Otherwise the system assumes true environment variables.

- `THEME_MODE`
    - Supported values:
        - `prod` - Forces both `THEME_CSS_MODE` and `THEME_JS_MODE` into `static` mode
        - `stage` - No difference currently
        - `dev` (*default*) - No difference currently
- `THEME_CSS_MODE`
    - Supported values:
        - `dynamic` (*default*) - Loads CSS files from the `/css/` relative to the path theme root following the glob pattern `/css/[0-9][0-9][0-9]-*.css`
        - `static` - Loads CSS files as defined in the webpack encore entry file
    - Usage notes:
        - If `THEME_MODE` is set to `prod`, this configured value is ignore and instead `static` is always used
- `THEME_JS_MODE`
    - Supported values:
        - `dynamic` (*default*) - Loads JS files from the `/js/` relative to the path theme root following the glob pattern `/js/[0-9][0-9][0-9]-*.js`
        - `static` - Loads JS files as defined in the webpack encore entry file
    - Usage notes:
        - If `THEME_MODE` is set to `prod`, this configured value is ignore and instead `static` is always used
- `THEME_WEBPACK_ENTRY_FILE`
    - Supported values:
        - Either the absolute path to the webpack file or a path relative to the theme's root
        - Default: `./static/build/entrypoints.json`
- `THEME_WEBPACK_ENTRY_DEFAULT`
    - Supported values:
        - The name for the theme's default entry that should represent the bulk of the CSS and JS required to load the site.
        - Default: `main`

Usage
-----

[](#usage)

```
add_action(
            'wp_enqueue_scripts',
            function()
            {
                \Vendi\VendiAssetLoader\Loader::enqueue_default();
            }
        );

```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 98.6% 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 ~203 days

Recently: every ~183 days

Total

12

Last Release

522d ago

Major Versions

1.0.1 → v2.0.02019-07-24

v2.0.2 → v3.0.02021-06-28

v3.0.1 → v4.0.02022-12-02

PHP version history (4 changes)v3.0.0PHP ^7.3|^8.0

v4.0.0PHP ^8.0|^8.1

v4.0.3PHP ^8.0|^8.1|^8.2|^8.3

v4.0.4PHP ^8.0|^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7748460?v=4)[Chris Haas](/maintainers/cjhaas)[@cjhaas](https://github.com/cjhaas)

---

Top Contributors

[![cjhaas](https://avatars.githubusercontent.com/u/7748460?v=4)](https://github.com/cjhaas "cjhaas (69 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vendi-advertising-vendi-asset-loader/health.svg)

```
[![Health](https://phpackages.com/badges/vendi-advertising-vendi-asset-loader/health.svg)](https://phpackages.com/packages/vendi-advertising-vendi-asset-loader)
```

###  Alternatives

[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

374468.4k51](/packages/flow-php-etl)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[shyim/danger-php

Port of danger to PHP

8544.9k](/packages/shyim-danger-php)[puli/manager

Manages the puli.json file of a Puli project.

6847.9k3](/packages/puli-manager)[eliashaeussler/typo3-solver

Extension for TYPO3 CMS to extend TYPO3's exception handling with AI generated solutions

292.1k](/packages/eliashaeussler-typo3-solver)

PHPackages © 2026

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