enlitepro/enlite-assetic

The module add assetic cache, some filters (coffee, csso, less, ngmin, uglify, uglifycc), support @asset from other collections, put current version to static files

v1.2.1 2016-02-17 08:36 UTC

README

INSTALL

The recommended way to install is through composer.

{
    "require": {
        "enlitepro/enlite-assetic": "1.*"
    }
}

USAGE

Add EnliteAssetic to your config/application.config.php to enable module.

  • EnliteUglifyFilter (require npm module uglify-js)
  • EnliteCoffeeFilter (require npm module coffee-script)
  • EnliteLessFilter (require npm module less)
  • EnliteCssoFilter (require npm module csso)
  • EnliteUglifycssFilter (require npm module uglifycss)
    'admin_js' => array(
        'assets' => array(
            // ...
        ),
        'filters' => array('?EnliteUglifyFilter'),
    ),

or

    'admin_js' => array(
        'assets' => array(
            // ...
        ),
        'filters' => array(
            '?EnliteCoffeeFilter' => ''
        ),
    ),

Capistrano revision inject

    'service_manager' => array(
        'aliases' => array(
            'AsseticConfiguration' => 'EnliteAssetic\Configuration'
        ),
    )