PHPackages                             octris/assets - 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. octris/assets

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

octris/assets
=============

Installer for octris package assets.

v0.0.1(8y ago)07proprietaryPHPPHP &gt;=5.6.0

Since Jun 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/octris/assets)[ Packagist](https://packagist.org/packages/octris/assets)[ Docs](https://github.com/octris/assets)[ RSS](/packages/octris-assets/feed)WikiDiscussions master Synced 3d ago

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

Assets
======

[](#assets)

This is a simple assets manager for the octris php framework to make it possible to install additional modules containing Javascript, Css, Images etc. using composer. The assets manager acts as composer plugin and hooks into installation and updating commands. It tries to install new assets, update existing assets and remove no longer needed assets.

Configuration
-------------

[](#configuration)

The assets manager needs configuration in the composer.json file of the main package as well as the sub-package containing assets. This is done by defining an `octris/assets` namespace inside the `extra`part of composer.json.

### Sub-package

[](#sub-package)

Define as many sources as you want. The following example maps directories inside the sub-package to source-keys:

```
js => /libsjs
css => /styles

```

The directories have to be defined as relative to the root directory of the sub-package.

```
...
"extra": {
    "octris/assets": {
        "source": {
            "js": "libsjs",
            "css": "styles"
        }
    }
},
...

```

### Main package

[](#main-package)

In the main package the source-keys can be mapped to (target) directories, in the main package. The directories have to be defined as relative to the root directory of the main package. The assets manager will create necessary directories when it runs.

```
"extra": {
    "octris/assets": {
        "target": {
            "js": "vendor_assets/js",
            "css": "vendor_assets/css",
            "img": "host/vendor_assets"
        }
    }
},

```

The asset source directories will be symlinked into the target directories.

As example, if the name of the sub-package would be `octris/assetsdemo`, the following symlinks would be created in the main-package for the above configuration:

```
MAIN_PKG_ROOT/vendor_assets/css/octris/assetsdemo -> MAIN_PKG_ROOT/vendor/octris/assetsdemo/styles
MAIN_PKG_ROOT/vendor_assets/js/octris/assetsdemo -> MAIN_PKG_ROOT/vendor/octris/assetsdemo/libsjs

```

### Application configuration

[](#application-configuration)

To make it possible to manage assets with the template compiler of the octris php framework, additional configuration might be required. Open the file `etc/global.php` of your octris web project and configure the additional paths for the template engine:

```
    $tpl->addPostprocessor(
        new \Octris\Core\Tpl\Postprocess\CombineJs(
-           [ '/libsjs/' => OCTRIS_APP_BASE . '/libsjs/' ],
+           [
+               '/libsjs/' => OCTRIS_APP_BASE . '/libsjs/',
+               '/vendor_js/' => OCTRIS_APP_BASE . '/vendor_assets/js/'
+           ],
            OCTRIS_APP_BASE . '/host/libsjs/'
        )
    );
    $tpl->addPostprocessor(
        new \Octris\Core\Tpl\Postprocess\CombineCss(
-           [ '/styles/' => OCTRIS_APP_BASE . '/styles/' ],
+           [
+               '/styles/' => OCTRIS_APP_BASE . '/styles/' ,
+               '/vendor_css/' => OCTRIS_APP_BASE . '/vendor_assets/css/'
+           ],
            OCTRIS_APP_BASE . '/host/styles/'
        )
    );
```

The new assets can be accessed in the template by specifying the configured additional root paths.

Example:

```

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

3268d ago

### Community

Maintainers

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

---

Top Contributors

[![aurora](https://avatars.githubusercontent.com/u/304837?v=4)](https://github.com/aurora "aurora (20 commits)")

---

Tags

asset-managercomposercomposer-pluginoctris

### Embed Badge

![Health badge](/badges/octris-assets/health.svg)

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

###  Alternatives

[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[olvlvl/composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes

184108.8k8](/packages/olvlvl-composer-attribute-collector)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)

PHPackages © 2026

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