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

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

vegas-cmf/assets
================

Vegas CMF Assets

v3.0(9y ago)0188MITJavaScriptPHP ^5.5 || ^7.0

Since May 20Pushed 9y ago4 watchersCompare

[ Source](https://github.com/vegas-cmf/assets)[ Packagist](https://packagist.org/packages/vegas-cmf/assets)[ RSS](/packages/vegas-cmf-assets/feed)WikiDiscussions master Synced today

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

Vegas CMF Assets
================

[](#vegas-cmf-assets)

To provide easiness of maintaining assets we prepared grunt and gulp tasks which allow you to download all dependencies from vendor directory. We have specified unique name - `vegas.json` - to store project's dependencies (and their overrides) in external libraries.

#### Example vegas.json

[](#example-vegasjson)

```
{
    "dependencies": {
        "bootstrap": "3.1.0"
    },
    "exportsOverride": {
        "bootstrap": {
            "js": [
                "dist/js/*.js",
                "dist/js/*.map"
            ],
            "css": [
                "dist/css/*.css",
                "dist/css/*.map"
            ],
            "fonts": "dist/fonts/*.*"
        }
    }

}
```

### Requirements

[](#requirements)

#### Grunt

[](#grunt)

```
$ npm install --global grunt-cli
```

#### Gulp

[](#gulp)

**If you have previously installed a version of gulp globally, please run `npm rm --global gulp`to make sure your old version doesn't collide with gulp-cli.**

```
$ npm install --global gulp-cli
```

### Basic setup

[](#basic-setup)

Add the following script commands to your composer.json file

#### Grunt commands:

[](#grunt-commands)

```
"scripts": {
    "post-install-cmd": [
        "cp -n ./vendor/vegas-cmf/assets/Gruntfile.js ./Gruntfile.js",
        "cp -n ./vendor/vegas-cmf/assets/grunt_package.json ./package.json",
        "cp -n ./vendor/vegas-cmf/assets/bower.json ./bower_base.json"
    ],
    "post-update-cmd": [
        "cp -n ./vendor/vegas-cmf/assets/Gruntfile.js ./Gruntfile.js || true",
        "cp -n ./vendor/vegas-cmf/assets/grunt_package.json ./package.json || true",
        "cp -n ./vendor/vegas-cmf/assets/bower.json ./bower_base.json || true"
    ]
}
```

#### Gulp commands:

[](#gulp-commands)

```
"scripts": {

    "post-install-cmd": [
        "cp -n ./vendor/vegas-cmf/assets/gulpfile.js ./gulpfile.js",
        "cp -n ./vendor/vegas-cmf/assets/gulp_package.json ./package.json",
        "cp -n ./vendor/vegas-cmf/assets/bower.json ./bower_base.json"
    ],
    "post-update-cmd": [
        "cp -n ./vendor/vegas-cmf/assets/gulpfile.js ./gulpfile.js || true",
        "cp -n ./vendor/vegas-cmf/assets/gulp_package.json ./package.json || true",
        "cp -n ./vendor/vegas-cmf/assets/bower.json ./bower_base.json || true"
    ]
}
```

Run composer update or install command

```
php composer.phar update
```

Install NPM packages

```
npm install
```

> Note: Use sudo in case of permission problems

### Run

[](#run)

Merge all assets to bower file and run bower install by a simple shell command

```
grunt
```

or:

```
gulp
```

#### Custom options

[](#custom-options)

You can also run bower install or bower update task without merging assets from vendor. For grunt:

```
grunt bower:update // update

grunt bower:install // install
```

For gulp:

```
gulp bower
```

Vegas CMF Assets Manager
========================

[](#vegas-cmf-assets-manager)

Within this package, an assets container has been delivered, it's based on Phalcon's one. Assets Manager allows you to easily add resources like JS scripts, CSS styles etc. To use this feature, please create shared service in your Vegas project, as follows:

```
namespace App\Shared;

use Vegas\Di\Injector\SharedServiceProviderInterface;

class AssetsManager implements SharedServiceProviderInterface
{
    /**
     * @return string
     */
    public function getName()
    {
        return 'assets';
    }

    /**
     * @param \Phalcon\DiInterface $di
     * @return mixed
     */
    public function getProvider(\Phalcon\DiInterface $di)
    {
        return function() use ($di)
        {
            return new Vegas\Assets\Manager();
        };
    }
}
```

From this point, you will have a possibilty to invoke Manager methods, by following syntax:

```
// output JS files path
{{ assets.outputJs() }}

// output CSS files path
{{ assets.outputCss() }}

// add JS file to assets container
{{ assets.addJs('some/valid/path/to/js/file.js') }}

// add CSS file to assets container
{{ assets.addCss('some/valid/path/to/css/file.css') }}

```

\####Note#### Keep it in mind, that `config.php` file must be updated too.

```
'sharedServices' => [
    ...
    'App\Shared\AssetsManager'
]
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~66 days

Total

5

Last Release

3429d ago

Major Versions

v1.2 → v3.02017-02-08

PHP version history (2 changes)2.0.x-devPHP &gt;=5.4

v3.0PHP ^5.5 || ^7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46222392?v=4)[vegas](/maintainers/vegas)[@vegas](https://github.com/vegas)

---

Top Contributors

[![maniolek](https://avatars.githubusercontent.com/u/3389670?v=4)](https://github.com/maniolek "maniolek (8 commits)")[![archdevil666pl](https://avatars.githubusercontent.com/u/2486875?v=4)](https://github.com/archdevil666pl "archdevil666pl (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[abei2017/yii2-wx

一个专注于yii2的微信sdk

1472.8k](/packages/abei2017-yii2-wx)[stanislav-web/phalcon-sms-factory

Multiple gateway SMS Sender factory. Provide any SMS services inside your Phalcon's projects

321.6k](/packages/stanislav-web-phalcon-sms-factory)

PHPackages © 2026

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