[ 
https://issues.apache.org/jira/browse/JSPWIKI-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13727901#comment-13727901
 ] 

brushed commented on JSPWIKI-761:
---------------------------------


Implementing the WRO4J ( Web Resource Optimizer for Java ) Build-time solution 
in JSPWiki through the wro4j maven plugin. ( see 
http://code.google.com/p/wro4j/wiki/MavenPlugin )

* replacing YUI-Compressor for JS by UglifyJS (better compression)
* introducing the LESS CSS preprocessor supporting advanced css authoring 
capabilities  (variables, mixins, ...)
* merging JS and CSS files to reduce the number of resources needed at 
page-load.
** jspwiki-common.js = { jspwiki-common.js, jspwiki-commonstyles.js, 
prettify.js }
** jspwiki-edit.js = { jspwiki-edit.js, posteditor.js}
** jspwiki-prefs.js = { jspwiki-prefs.js }
** the mootools library is kept as a separate resource  (could be serviced from 
a CDN)

FFS: in a next stage, we can merge even further, but this may require 
adaptations to the way JSPWiki is dynamically adding resources.

Note: You can build with or without minification of the JS and CSS files to 
ease development by using -Dminimize = true | false. (ref. mvn_cheat-sheet.txt)


Next steps :
* We need to rethink the way JSPWiki skins (CSS stylesheets and JS addons) are 
handled.  For now, they remain uncompressed and unmerged.
* The current monolithic JS and CSS files can now be refactored and broken up 
in smaller and more manageable pieces. WRO4J will take care of merging and 
compression.

 

                
> Use wro4j to build/minimize javascript and css
> ----------------------------------------------
>
>                 Key: JSPWIKI-761
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-761
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.9
>            Reporter: brushed
>            Priority: Minor
>
> Currently jspwiki builds its javascript and css files from ant. This simply 
> means compression by means of the YUI compressors.  The css and js sources 
> are large chunks of javascript and css.
> Introducing wro4j : (See http://code.google.com/p/wro4j/) 
> {quote}
> Free and Open Source Java project which brings together almost all the modern 
> web tools: JsHint, CssLint, JsMin, Google Closure compressor, YUI Compressor, 
> UglifyJs, Dojo Shrinksafe, Css Variables Support, JSON Compression, Less, 
> Sass, CoffeeScript and much more. In the same time, the aim is to keep it as 
> simple as possible and as extensible as possible in order to be easily 
> adapted to application specific needs.
> Easily improve your web application loading time. Keep project web resources 
> (js & css) well organized, merge & minify them at run-time (using a simple 
> filter) or build-time (using maven plugin) and has a dozen of features you 
> may find useful when dealing with web resources.
> {quote}
> Benefits : 
> * Adding wro4j will allow to break the js and css into logical components, 
> and improve source management. 
> * JSPWiki stylesheet- and skin-development can be improved by introducing 
> LESS.
> * WRO4J can be used as servlet-filter (run-time building and compression of 
> js and css) or at build-time.
> * WRO4J will improved page-loading time. (merge and zip of js/css resources)
> * WRO4J has an Apache licensed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to