Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.18 KB

README.md

File metadata and controls

55 lines (36 loc) · 1.18 KB

humpty-css

Provides minification and URL rewriting for CSS files in the humpty pipeline.

Installation

In Maven:

<dependency>
  <groupId>co.mewf.humpty</groupId>
  <artifactId>humpty-css</artifactId>
  <version>1.0.0-SNAPSHOT</version>
</dependency>

URL rewriting

Rewrites url imports to paths that can be served by Servlet 3's resource mechanism. For example, in Bootstrap:

src: url('../fonts/glyphicons-halflings-regular.eot');

is rewritten to

src:url('/webjars/bootstrap/3.2.0/fonts/glyphicons-halflings-regular.eot');

The latter can be served directly by a Servlet 3.0 container.

Compression

Uses an inline version of YUI Compressor to avoid dragging in YUI Compressor's JavaScript-related dependencies.

Configuration

Name

css

Options

Option Default Description
minify only in production mode Set to true or false to force minification to be always on or off, respectively
rewrite true Set to false to disable URL rewriting

Example

[options.css]
  minify = true