Licence
MIT
Version
0.9.0
Deps
0
Vulns
0
Weekly
0
css-url-rewrite
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);
}