PHPackages                             gavinggordon/assetinc - 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. gavinggordon/assetinc

ActiveLibrary

gavinggordon/assetinc
=====================

A PHP class which provides simple javascript or css asset inclusion.

1.0.1(10y ago)018MITPHP

Since Apr 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/gavinggordon/assetinc)[ Packagist](https://packagist.org/packages/gavinggordon/assetinc)[ Docs](http://assetinc.gavingordon.com)[ RSS](/packages/gavinggordon-assetinc/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

AssetInc
========

[](#assetinc)

[![Build Status](https://camo.githubusercontent.com/2af43c3a5af3bc901b6e9851a0a42e7e8965c7a7fab05c6d72306f1a371ad5cb/68747470733a2f2f7472617669732d63692e6f72672f676176696e67676f72646f6e2f6173736574696e632e7376673f6272616e63683d76312e302e31)](https://travis-ci.org/gavinggordon/assetinc)

This class (GGG\\AssetInc\\AssetInc) provides a simple and quick way to include/add JS or CSS assets to an HTML document's head and/or body.

Installation
------------

[](#installation)

```
composer require gavinggordon/assetinc

```

Examples
--------

[](#examples)

#### Instantiation:

[](#instantiation)

```
include_once( __DIR__ . '/vendor/autoload.php' );

$JSasset = \GGG\AssetInc\AssetInc::init( 'js' );

$CSSasset = \GGG\AssetInc\AssetInc::init( 'css' );

```

#### JS:

[](#js)

```
$JSasset->insert( 'jquery' );
// Result:

$JSasset->add_asset( ASSET_NAME, ASSET_URL );
$JSasset->insert( ASSET_NAME );
// Result: ASSET_URL

```

#### CSS:

[](#css)

```
$CSSasset->insert( 'font-awesome' );
// Result:

$CSSasset->add_asset( ASSET_NAME, ASSET_URL );
$CSSasset->insert( ASSET_NAME );
// Result: ASSET_URL

```

[View this class package](http://www.phpclasses.org/package/9698.html) on [PHPClasses.org](http://www.phpclasses.org).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

Every ~0 days

Total

2

Last Release

3683d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0265c11e917254193d286a481b3fa7794c4dd83ba29f71d239a19c1724956566?d=identicon)[gavinggordon](/maintainers/gavinggordon)

---

Top Contributors

[![gavinggordon](https://avatars.githubusercontent.com/u/7691513?v=4)](https://github.com/gavinggordon "gavinggordon (18 commits)")

---

Tags

phplinkjavascriptcssJShtmlstylesheetscriptincludev1.0.1assetinc

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gavinggordon-assetinc/health.svg)

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

###  Alternatives

[middlewares/minifier

Middleware to minify Html, CSS and Javascript responses

1729.1k2](/packages/middlewares-minifier)

PHPackages © 2026

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