[ 
https://issues.apache.org/jira/browse/WICKET-918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Frank Bille Jensen updated WICKET-918:
--------------------------------------

    Fix Version/s:     (was: 1.4-M2)
                   1.4-M3

> allow for pluggable javascript compression algorithms
> -----------------------------------------------------
>
>                 Key: WICKET-918
>                 URL: https://issues.apache.org/jira/browse/WICKET-918
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>            Reporter: Ryan Sonnek
>            Assignee: Matej Knopp
>            Priority: Minor
>             Fix For: 1.4-M3
>
>
> The current JavascripResource uses a very simple algorithm to compress 
> javascript (JavascriptStripper).  This should be abstracted into a pluggable 
> interface so that any algorithm can be used.  There are a number of popular 
> javascript compression tools out there that could be integrated into wicket 
> if this feature is supported.
> * dojo javascript compression tool
> * JSMin
> * YUI compression tool
> My suggestion for implementation would be to create an interface:
> {code}
> public interface JavascriptCompressor {
>   public String stripCommentsAndWhitespace(String original);
> }
> {code}
> The existing JavascriptStripper would be the default implementation, but 
> there would be an application setting to swap in a different implementation.  
> Actually I would recommend creating a NoOp implementation as the default 
> implementation.
> {code}
> public class MyApplication extends WebApplication {
>   public void init() {
>     getResourceSettings().setJavascriptCompressor(new 
> MyFancyJavascriptCompressor());
>   }
> }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to