Skip to content
프로젝트

소개

JsHint, CssLint, JsMin, Google Closure compressor, YUI Compressor, UglifyJs, Dojo Shrinksafe, CSS 변수 지원, JSON 압축, Less, Sass, CoffeeScript 등 거의 모든 최신 웹 도구를 한데 모은 자유 오픈 소스 Java 프로젝트입니다. 애플리케이션별 요구 사항에 쉽게 맞출 수 있도록 최대한 단순하고 확장하기 쉽게 만드는 것을 목표로 합니다.

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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

Wro4j has 2 possible operating modes:

  • Runtime solution - the resources are processed lazily after the first request. Assuming you have defined 100 groups and only one is requested, the remaining 99 won't be processed.
  • Build time solution - the resources are processed when the application is built. You are in control of defining what groups should be generated (either all of them or only a subset enumerated in configuration).

If what you need is to have all resources available during application startup, then probably using a build-time solution (Maven plugin) is the best suited for you. Alternatively, you could use the runtime solution and explicitly perform requests for all the groups after application startup.

In order to get started with Wro4j's runtime solution, 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>
    <!-- Insert body of your page here -->
  </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 us on Twitter.

License

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

관련 프로젝트 살펴보기

불러오는 중…