Minify JS CSS | Community
Skip to main content
October 16, 2015
Solved

Minify JS CSS

  • October 16, 2015
  • 11 replies
  • 4537 views

Turning minify to ON using  com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl   is  doing ONLY basic minification. For example carriage return is not removed from CSS and JS

Even obfuscation is also basic.

If there a way to configure the YUI compressor that it uses with advanced parameters for more compression of the statis files (JS and CSS) ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kunal_Gaba_

You can get the jar file by following these steps- 

  1. Open http://localhost:4502/system/console/bundles/com.adobe.granite.ui.clientlibs
  2. Find the bundle Id on the page 
  3. Go to crx-quickstart/launchpad/felix/bundle<bundleid> folder. You will see bundle.jar in that folder. 

11 replies

October 16, 2015

Thanks Kunal.

The line break argument should be passed -1 so that that the resultant minified file has no new line.

https://github.com/yui/yuicompressor/blob/master/src/com/yahoo/platform/yui/compressor/JavaScriptCompressor.java

************************

if (linebreakpos >= 0 && result.length() - linestartpos > linebreakpos) {

    result.append('\n');

    linestartpos = result.length();

}

 

Have figured this out and now it is working