AssetsManager is a plugin to use with Composer to let it handle some package's assets (CSS, JS, images ...) the same way it does for PHP scripts. A special autoloader stores dependencies assets to let you call them smartly.

Installation

AssetsManager is referenced to the Packagist. To install the plugin, just add the package to your requirements in the composer.json configuration file of your project:

»

How does it work?

The plugin handles any package with a type ***-assets, which will be considered as a standard library by Composer if you don't use the plugin (and will be installed as any other classic library package).

»

Usage

This part will try to explain how to use the assets manager in your scripts.

»

Configuration

Below is an example of the package configuration using default values:

»

Minify & merge assets

The plugin embeds a Compressor object to merge and minify JS and CSS contents. The result files are stored on a the "temporary assets directory" (a configuration variable) and can be used "as-is" in HTML contents.

»

Development notes

As for all our work, we try to follow the coding standards and naming rules most commonly in use:

»
on #dev