Skip to content

mwanji/humpty-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Processes CSS in the humpty pipeline

Resources

License

Stars

Watchers

Forks

Packages

No packages published