org.broadleafcommerce.common.resource.service
Interface ResourceMinificationService
- All Known Implementing Classes:
- ResourceMinificationServiceImpl
public interface ResourceMinificationService
Service responsible for interacting with YUI-compressor to minify JS/CSS resources.
- Author:
- Andre Azzolini (apazzolini)
|
Method Summary |
byte[] |
minify(String filename,
byte[] bytes)
Given the source byte[], will return a byte[] that represents the YUI-compressor minified version
of the byte[]. |
minify
byte[] minify(String filename,
byte[] bytes)
- Given the source byte[], will return a byte[] that represents the YUI-compressor minified version
of the byte[]. The behavior of this method is controlled via the following properties:
- minify.enabled - whether or not to actually perform minification
- minify.linebreak - if set to a value other than -1, will enforce a linebreak at that value
- minify.munge - if true, will replace variable names with shorter versions
- minify.verbose - if true, will display extra logging information to the console
- minify.preserveAllSemiColons - if true, will never remove semi-colons, even if two in a row exist
- minify.disableOptimizations - if true, will disable some micro-optimizations that are performed
- Parameters:
filename - bytes -
- Returns:
- the minified bytes
Copyright © 2013. All Rights Reserved.