Tapestry WRO4J

Web Resource Optimizer integration for Tapestry 5.3

License

License

Categories

Categories

Tape Data Data Structures
GroupId

GroupId

com.github.lltyk
ArtifactId

ArtifactId

tapestry-wro4j
Last Version

Last Version

0.9.8
Release Date

Release Date

Type

Type

jar
Description

Description

Tapestry WRO4J
Web Resource Optimizer integration for Tapestry 5.3
Project URL

Project URL

https://github.com/lltyk/tapestry-wro4j

Download tapestry-wro4j

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.lltyk/tapestry-wro4j/ -->
<dependency>
    <groupId>com.github.lltyk</groupId>
    <artifactId>tapestry-wro4j</artifactId>
    <version>0.9.8</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.lltyk/tapestry-wro4j/
implementation 'com.github.lltyk:tapestry-wro4j:0.9.8'
// https://jarcasting.com/artifacts/com.github.lltyk/tapestry-wro4j/
implementation ("com.github.lltyk:tapestry-wro4j:0.9.8")
'com.github.lltyk:tapestry-wro4j:jar:0.9.8'
<dependency org="com.github.lltyk" name="tapestry-wro4j" rev="0.9.8">
  <artifact name="tapestry-wro4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.lltyk', module='tapestry-wro4j', version='0.9.8')
)
libraryDependencies += "com.github.lltyk" % "tapestry-wro4j" % "0.9.8"
[com.github.lltyk/tapestry-wro4j "0.9.8"]

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.tapestry : tapestry-core jar 5.3.6
ro.isdc.wro4j : wro4j-core jar 1.6.1
ro.isdc.wro4j : wro4j-extensions jar 1.6.1

provided (1)

Group / Artifact Type Version
javax.servlet : servlet-api jar 2.5

test (3)

Group / Artifact Type Version
org.apache.tapestry : tapestry-test jar 5.3.6
junit : junit jar 4.10
org.mockito : mockito-core jar 1.9.0

Project Modules

There are no modules declared in this project.

Tapestry WRO4J

Build Status

Adds support for various Web Resource Optimizer components to Tapestry 5.3.

Included are various choices of JavaScript and CSS minifiers, and Less/Sass/Coffeescript transformers.

Usage

The transformers automatically associate with their file extensions, simply create one (a .coffee file for example), and include it on a page just as you would a js file:

@Import(library="somefile.coffee",stylesheet="someotherfile.less")

By default, Google Closure Compiler is used for JS minimization, and YUI is used for CSS. JS can also be processed by UglifyJSMinimizer. You can use one instead with this in your AppModule:

@Contribute(ResourceMinimizer.class)
@Primary
public static void contributeMinimizers(MappedConfiguration<String, ResourceMinimizer> configuration)
{
  configuration.overrideInstance("text/javascript", UglifyJSMinimizer.class);
}

By default Tapestry only enables minification when the tapestry.production-mode flag is set. You can enable it manually in your AppModule like so:

public static void contributeApplicationDefaults(MappedConfiguration<String, String> configuration)
{
  configuration.add(SymbolConstants.MINIFICATION_ENABLED, "true");
}

WRO4J's WroFilter will be automatically enabled (without having to add it in web.xml) if a wro configuration file is found. Other WRO4J features that are not automatically enabled can be added manually this way. For example, if the following wro.groovy file is present in WEB-INF, assets at /contextpath/wro/all.js and /contextpath/wro/all.css become available:

groups {
  all {
    js "/js/**.js"
    css "/css/**.css"
  }
}

This can be turned off with the WRO4JSymbolConstants.AUTO_ENABLE_WRO_FILTER symbol.

0.9.8

Update Tapestry to 5.3.6 and WRO4J to 1.6.1 Exclude less4j module from wro4j dependency as it is shiipped with unwanted classes See https://github.com/alexo/wro4j/issues/75 and https://github.com/SomMeri/less4j/issues/49 Switched to better SASS implemention in WRO4J Switched default JS minimizer back to Google Closure Removed YUI JS minimizer Disabled @import in LessCssTransformer

0.9.6

Switching default JS minimizer to YUI, since closure compiler was conflicting with Tapestry 5.3.3/Underscore 1.3.3

0.9.5

Tapestry 5.3.3 Added symbols for disabling automatic adding of transformers in WRO4JSymbolConstants Added automatic registration of WroFilter without having to modify web.xml Tweaked RequireJS support

0.9.4

WRO4J 1.4.5 Experimental RequireJS support

0.9.3

WRO4J 1.4.4

0.9.2

Tapestry 5.3.2

0.9.1

Automatically included WRO4JModule in jar manifest. Added Google Closure for JS and YUI for CSS as default minimizers. Fixed UglifyJS/Prototype interoperability. Fixed Less import support (issue #2) WRO4J 1.4.3

0.9

Initial Release WRO4JModule needs to be included manually with @SubModule. Minifiers need to be added manually using contributeMinimizers. WRO4J 1.4.2

Versions

Version
0.9.8
0.9.6
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
0.9