0.9.0 • Published 9 years ago

css-url-rewrite v0.9.0

Weekly downloads
27
License
MIT
Repository
github
Last release
9 years ago

css-url-rewrite

Build Status

Replace all @imports and url()s using a given function.

Installation

$ npm install --save css-url-rewrite

Usage

function replace(url) {
  return 'http://example.com' + url;
}

var replaced = rewriteCssUrls(css, replace);
body {
  background: url(/images/bg.png);
}

yields:

body {
  background: url(http://example.com/images/bg.png);
}