PHPackages                             johnpitcher/public-vendor - 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. johnpitcher/public-vendor

ActiveLibrary

johnpitcher/public-vendor
=========================

Silex provider and grunt task for dealing with static assets in composer's vendor directory

v0.0.1(12y ago)017MITPHPPHP &gt;=5.3.3

Since Oct 16Pushed 12y ago2 watchersCompare

[ Source](https://github.com/johnpitcher/public-vendor)[ Packagist](https://packagist.org/packages/johnpitcher/public-vendor)[ Docs](https://github.com/johnpitcher/public-vendor)[ RSS](/packages/johnpitcher-public-vendor/feed)WikiDiscussions master Synced 2mo ago

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

Silex provider:
===============

[](#silex-provider)

Silex provider define addittional routes whitch are resolved as vendor assets (this is only helpful when you don't want to have `vendor` folder in `public` directory). For example:

```
project
  app - application directory
  vendor - composer libraries
    author
      package
        assets
          css
          js
            file.js
          img
  public - http root folder
    css
    js
    img

```

If you want to access to package assets using public-vendor provider use this url:

```

```

### Setup provider

[](#setup-provider)

```
$app = Silex\Application();
$app->register(new PublicVendor\ServiceProvider());
```

### Setup vendor path

[](#setup-vendor-path)

Default vendor path is `__DIR__.'../../../../'` as it should be in composer's vendor folder.

```
$app['public-vendor']->setPath('new/path');
```

### Setup aliases

[](#setup-aliases)

Alias helps to remove one part of vendor name, for example: from `author/package` to `package`.

This configuration:

```
$app['public-vendor']->addAlias('author/package', 'package');
```

will make this path available:

```

```

### Setup sub paths

[](#setup-sub-paths)

Sub paths define directory in package where asset are stored. This configuration:

```
$app['public-vendor']->addSubPath('author/package', 'assets');
```

will make this path available:

```

```

Grunt Task:
===========

[](#grunt-task)

If you are using `usemin` task you can add `publicVendor` task before `useminPrepare`. It's important to setup `gruntfile.js` in the same directory as composer's `vendor` directory. For example:

```
project
  vendor
  public
  gruntfile.js

```

### Setup task

[](#setup-task)

```
grunt.loadTasks('vendor/johnpitcher/public-vendor/tasks')
grunt.initConfig({
  publicVendor: {
    options:{
      aliases: { 'package' : 'author/package' },
      subPaths: { 'author/package' : 'assets' },
      baseDir: 'vendor'
    }
  },
  useminPrepare: { ... }
);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

4589d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/09e4260162bf75103f6060da71d4d6e7a78bb92608aec2d93db9a27970237fd6?d=identicon)[johnpitcher](/maintainers/johnpitcher)

---

Top Contributors

[![oldjp](https://avatars.githubusercontent.com/u/4865663?v=4)](https://github.com/oldjp "oldjp (12 commits)")

### Embed Badge

![Health badge](/badges/johnpitcher-public-vendor/health.svg)

```
[![Health](https://phpackages.com/badges/johnpitcher-public-vendor/health.svg)](https://phpackages.com/packages/johnpitcher-public-vendor)
```

###  Alternatives

[stikmanw/silex-newrelic

Integrate the NewRelic PHP API into Silex framework

2014.7k](/packages/stikmanw-silex-newrelic)

PHPackages © 2026

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