joseki / webloader-filters
This is an extension of janmarek/webloader. This extension contains filters to minify js and css.
Installs: 187 981
Dependents: 10
Suggesters: 8
Security: 0
Stars: 9
Watchers: 3
Forks: 4
Open Issues: 1
Requires
- php: >= 5.3.0
- natxet/cssmin: ~3.0
- tedivm/jshrink: ~1.0
Requires (Dev)
- janmarek/webloader: ~2.5
- mockery/mockery: dev-master
- nette/bootstrap: ~2.2
- nette/robot-loader: ~2.2
- nette/tester: ~1.0
- tracy/tracy: ~2.2
Suggests
- janmarek/webloader: Tool for loading or deploying CSS and JS files into web pages.
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