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

Juergen Donnerstag resolved WICKET-918.
---------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.5-M1)
                   1.4-RC2
         Assignee: Juergen Donnerstag  (was: Matej Knopp)

thanks. Patch applied.

Note that until 1.5 the old setting take precendence over the new one. If you 
want to use IJavascriptCompressor than 
resourcesetting.setStripJavascriptCommentXXXX() must be off (false). If true, 
wicket's default JavascriptStripper will be used irrespective of 
resourcesettings.setJavascriptCompressor

> 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: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.4-RC2
>
>
> 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