Minification and packing of JavaScripts- and CSS Files

JavaScript packing

(for unix systems)

  • open a terminal
  • change to the directory: <source location>/community-equity~svn/trunk/ceq-widget/web/js
  • there you can find 2 scripts to pack all ceq- and external files into 1 .js files for each.
    • merge_all_ceq_js - creates ceq_all_merged.js with all ceq js files
    • merge_all_ext_js - creates ext_all_merged.js with all used external js libraries
  • assign exution rights, if not already done
    • chmod +x merge_all_ceq_js
    • chmod +x merge_all_ext_js
  • run the 2 scripts
    • ./merge_all_ceq_js
    • ./merge_all_ext_js

JavaScript minification

Download a JS/CSS compressor, like YUI Compressor.

Run the tool for the two packed js files from above, for example using the YUI Compressor:
java -jar yuicompressor-2.4.2.jar ceq_all_merged.js -o ceq_all_merged.min.js --charset utf-8

CSS packing

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact