- It helps to test both unminified & minified versions irrespective of OSGi configuration by directly requesting the file from the browser. I.e, Once you develop your client library by following [1] you can test directly how much it minifies by adding a selector "min". For example, the granite library the URL for raw (unminified) and the minified file looks like [A] & [B].
http://<host>:<port>/etc/clientlibs/granite/jquery/granite.js
http://<host>:<port>/etc/clientlibs/granite/jquery/granite.min.js
http://<host>:<port>/etc/clientlibs/granite/jquery/granite.min.js
- If you have minified enabled in "CQ Html Library Manager" & all your library follows basic functionality of Client Library [1]. Then while restricting access via the Dispatcher make sure to have a stricter filter like [C][C]
# enable specific mime types in non-public content directories
/0041 { /type "allow" /glob "* *.min.css *" } # enable css
/0044 { /type "allow" /glob "* *.min.js *" } # enable javascript
References:
http://dev.day.com/docs/en/cq/current/developing/widgets.html
http://experiencedelivers.adobe.com/cemblog/en/experiencedelivers/2012/12/clientlibs-explained-by-example.html
/0041 { /type "allow" /glob "* *.min.css *" } # enable css
/0044 { /type "allow" /glob "* *.min.js *" } # enable javascript
References:
http://dev.day.com/docs/en/cq/current/developing/widgets.html
http://experiencedelivers.adobe.com/cemblog/en/experiencedelivers/2012/12/clientlibs-explained-by-example.html
No comments:
Post a Comment
If you have any doubts or questions, please let us know.