Skip to content
forked from wro4j/wro4j

免费和开源Java项目,汇集了几乎所有的现代Web工具:JsHint,CssLint,JsMin,Google Closure压缩器,YUI压缩器,UglifyJs,Dojo Shrinksafe,Css变量支持,JSON压缩,Less,Sass,CoffeeScript等等。在同一时间,目标是保持尽可能简单和可扩展的...

License

Notifications You must be signed in to change notification settings

308207109/wro4j

 
 

Repository files navigation

Web Resource Optimizer for Java

Join the chat at https://gitter.im/wro4j/wro4j Build Status Coverage Status Maven Central Stories in Ready

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 here

Issues

Found a bug? Report it to the issue tracker

Feedback

If you have any questions or suggestions, please feel free to post a comment to the discussion group

Follow me on Twitter.

License

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

About

免费和开源Java项目,汇集了几乎所有的现代Web工具:JsHint,CssLint,JsMin,Google Closure压缩器,YUI压缩器,UglifyJs,Dojo Shrinksafe,Css变量支持,JSON压缩,Less,Sass,CoffeeScript等等。在同一时间,目标是保持尽可能简单和可扩展的...

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 71.1%
  • CSS 17.3%
  • JavaScript 11.0%
  • Groovy 0.4%
  • HTML 0.2%
  • TypeScript 0.0%