You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Frank Bille Jensen (JIRA)" <ji...@apache.org> on 2007/12/06 19:56:55 UTC

[jira] Updated: (WICKET-918) allow for pluggable javascript compression algorithms

     [ 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.3.0-rc2)
                   1.3.0-rc3

> 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.3.0-rc3
>
>
> 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.