joseki/webloader-filters

This is an extension of janmarek/webloader. This extension contains filters to minify js and css.

v1.1 2015-10-11 23:02 UTC

This package is auto-updated.

Last update: 2024-11-05 21:31:42 UTC


README

Adapting javascript and CSS minify tools to Webloader.

Installation

The best way to install is using Composer:

$ composer require joseki/webloader-filters

Usage

Register minify services to your config.neon:

services:
  cssMin: Joseki\Webloader\CssMinFilter
  jsMin: Joseki\Webloader\JsMinFilter

... and then you can use them inside WebLoader extension as follows:

webloader:
  css:
    default: # your WebLoader css control name
      filters:
        - @cssMin

or for javascript:

webloader:
  js:
    default: # your WebLoader js control name
      filters:
        - @jsMin

NOTE: when using as a fileFilters, files containing .min. in their names will be ignored

webloader:
  js:
    default: # your WebLoader js control name
      files:
        - script.js
        - script.min.js    # this file will not be filtered by @jsMin
      fileFilters:
        - @jsMin