Search in sources :

Example 1 with DefaultJavaScriptCompressor

use of org.apache.wicket.javascript.DefaultJavaScriptCompressor in project wicket by apache.

the class CompressBundlesTest method newApplication.

@Override
protected WebApplication newApplication() {
    return new MockApplication() {

        @Override
        protected void init() {
            super.init();
            // remove that setting to see the original (non-compressed) version of the bundle
            getResourceSettings().setJavaScriptCompressor(new DefaultJavaScriptCompressor());
            getResourceBundles().addJavaScriptBundle(CompressBundlesTest.class, "bundle.js", new JavaScriptResourceReference(CompressBundlesTest.class, "two.js"), new JavaScriptResourceReference(CompressBundlesTest.class, "one.js"));
        }
    };
}
Also used : MockApplication(org.apache.wicket.mock.MockApplication) JavaScriptResourceReference(org.apache.wicket.request.resource.JavaScriptResourceReference) DefaultJavaScriptCompressor(org.apache.wicket.javascript.DefaultJavaScriptCompressor)

Aggregations

DefaultJavaScriptCompressor (org.apache.wicket.javascript.DefaultJavaScriptCompressor)1 MockApplication (org.apache.wicket.mock.MockApplication)1 JavaScriptResourceReference (org.apache.wicket.request.resource.JavaScriptResourceReference)1