Code Monkey home page Code Monkey logo

wro4j's Introduction

Web Resource Optimizer for Java

wro4j is a free and Open Source Java project which will help you to easily improve your web application page loading time. It can help you to keep your static resources (js & css) well organized, merge & minify them at run-time (using a simple filter) or build-time (using maven plugin) and has a dozen of features you may find useful when dealing with web resources.

Getting Started

In order to get started with wro4j, you have to follow only 3 simple steps.

Step 1: Add WroFilter to web.xml

	<filter>
	  <filter-name>WebResourceOptimizer</filter-name>
	  <filter-class>
		ro.isdc.wro.http.WroFilter
	  </filter-class>
	</filter>
	 
	<filter-mapping>
	  <filter-name>WebResourceOptimizer</filter-name>
	  <url-pattern>/wro/*</url-pattern>
	</filter-mapping>

Step 2: Create wro.xml

	<groups xmlns="http://www.isdc.ro/wro">
	  <group name="all">
		<css>/asset/*.css</css>
		<js>/asset/*.js</js>
	  </group>
	</groups> 		

Step 3: Use optimized resources

	<html>
	  <head>
		<title>Web Page using wro4j</title>
		<link rel="stylesheet" type="text/css" href="/wro/all.css" />
		<script type="text/javascript" src="/wro/all.js"/>
	  </head>
	  <body>
		
	  </body>
	</html>		

Documentation

The documentation for this project is located on google code project page: http://code.google.com/p/wro4j/

Issues

Found a bug? Report it to the issue tracker: http://code.google.com/p/wro4j/issues/list

Feedback

If you have any questions or suggestions, please feel free to post a comment to the discussion group: https://groups.google.com/forum/#!forum/wro4j

Follow me on tweeter.

License

This project is available under the Apache License, Version 2.0.

wro4j's People

Contributors

alexo avatar alf239 avatar dmitrye avatar eivindw avatar filirom1 avatar gconaty avatar ginkel avatar heldeen avatar ivarconr avatar julienwol avatar martin-g avatar michael-simons avatar nhajratw avatar nigelzor avatar

Stargazers

 avatar

Watchers

 avatar

wro4j's Issues

Don't set headers in development mode

As of version 1.1.0, the cache headers are set both in dev. mode and prod. 
mode. this makes it impossible to change a css/js and see the results quickly 
because the browser uses the version in cache.

Original issue reported on code.google.com by [email protected] on 17 Nov 2009 at 3:42

Move code base to GitHub

Move code base to GitHub & synchronize it periodically with svn from google 
code. Use Git for branch & tag management.

Original issue reported on code.google.com by [email protected] on 30 Jan 2010 at 9:50

Add support for base 64-encoded image in CSS

The goal of this enhancement is to allow the user to generate base 64 image 
in
their CSS.
This avoid unnecessary HTTP request to image as the image is embedded in the 
CSS.
Use CSSEmbedded project from Nicholas Zakas.

http://www.nczonline.net/blog/2009/11/03/automatic-data-uri-embedding-in-css-
files/

Original issue reported on code.google.com by [email protected] on 22 Jan 2010 at 9:24

Variables cannot be externalized

I tried to include a css containing only variables in all the groups. It 
doesn't work.
It seams that only variables included in each css file are taken into account.

Original issue reported on code.google.com by [email protected] on 16 Nov 2009 at 9:13

Integrate with Spring

1) Add spring dependency to extension project & be able to configure factory 
using spring configuration
2) Update documentation 

Original issue reported on code.google.com by [email protected] on 27 Jun 2009 at 12:55

interpoloation of the wro.xml

Wro.xml should allow a way to interpoloate its content from external 
configuration properties. For example:

<group name="g1">
  <css>${someUrl}</css>
</group>

where ${someUrl}, would be interpolated based on presence of 'someUrl' key 
which is located in some configurable location.

Original issue reported on code.google.com by [email protected] on 19 Feb 2010 at 6:31

BOM Characters at beginning of JS files breaks JS concatenation

What steps will reproduce the problem?
1. Enter a BOM character (http://en.wikipedia.org/wiki/Byte_order_mark) at
the beginning of a JS file.
2. Concatenate that file with other JS files.
3. JS will not work because ??? shows up in compressed/minified output.

What is the expected output? What do you see instead?

It'd be awesome if wro4j could detect these and remove them.

What version of the product are you using? On what operating system?

1.1.1 on OS X (Snow Leapard)

Please provide any additional information below.

I realize it'd be better to not have any BOMs in JS files, but I've been
bitten by this a couple times since I started using wro4j. Would be great
if it was smart enough to fix my files. ;-)

Original issue reported on code.google.com by [email protected] on 19 Feb 2010 at 6:02

Integrate CSS meta frameworks

@See:
http://www.w3avenue.com/2009/04/29/definitive-list-of-css-frameworks-pick-
your-style/

It contains few links for css meta frameworks. For each of these, create a 
CSS Post processor.

Original issue reported on code.google.com by [email protected] on 6 Nov 2009 at 7:28

Maven Repository

1) Create a repository in google code
2) Update wiki documentation with description of how download some version 
from repository

Original issue reported on code.google.com by [email protected] on 27 Jun 2009 at 12:51

Perform profiling

Do some profiling using jMeter or other tool, in order to identify eventual 
problems and bottlenecks.

Original issue reported on code.google.com by [email protected] on 5 Feb 2010 at 9:56

Create WroManagerFactory capable of being configured using init-params

This will allow adding & removing processors using init-param & some 
conventional param values:

<init-param>
  <param-name>cssPreProcessors</param-name>
  <param-value>urlRewriting</param-value>
</init-param>
<init-param>
  <param-name>jsPreProcessors</param-name>
  <param-value>jsMin</param-value>
<init-param>
<init-param>
  <param-name>uriLocators</param-name>
  <param-value>servletContext,classpath,url</param-value>
</init-param>

TODO:
- create a factory which contains no processors & no uriLocators & use this   
one for defining the new factory responsible for reading init-params.

Original issue reported on code.google.com by [email protected] on 30 Dec 2009 at 9:32

Runtime Configuration Option

Find a way for runtime configuration of the mode (DEVELOPMENT vs DEPLOYMENT).
Probably a good idea could be some properties files located somewhere in 
classpath (or maybe something else?)

Original issue reported on code.google.com by [email protected] on 9 Jan 2010 at 9:46

XmlModelFactory improvements

Do not create new WroModel factory if the wro.xml file is the same. This way, 
the processing will be much faster even in DEVELOPMENT mode. A goode idea 
would be to perform a processing in a separate thread which would be invoked 
from time to time.

Original issue reported on code.google.com by [email protected] on 24 Jan 2010 at 11:53

[Investigate] Merge changeable resources (and/or groups)

There are situations when the request for some resource (or group) should 
return different result for different request. Find a way to merge this kind 
of resources. This kind of resources (or groups) should be marked in xml with 
somekind of attributes.

Original issue reported on code.google.com by [email protected] on 10 Jan 2010 at 10:00

Integrate LRU cache strategy

Based on example from:
http://www.small-software.com/programming/java-mru-cache.html

Implement LRU cache strategy for caching wro resources.

Original issue reported on code.google.com by [email protected] on 7 Jan 2010 at 8:18

Create command line tool

Create a coomand line tool, similar to google-closure used to merge and 
minimize a list of resources. This could be useful for build tools like Ant.

Original issue reported on code.google.com by [email protected] on 14 Feb 2010 at 2:42

Support @import in css resources

Currently if the css resource is imported via @import inside the merged css, 
it doesn't work. Add the found @import resources to the group automatically.

Original issue reported on code.google.com by [email protected] on 13 Nov 2009 at 8:31

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.