css-url-rewrite
0.9.0 • Public • Published 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);
}
Package Sidebar
Install
Weekly Downloads