--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
31
node_modules/rework-plugin-url/index.js
generated
vendored
Normal file
31
node_modules/rework-plugin-url/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var func = require('rework-plugin-function');
|
||||
|
||||
/**
|
||||
* Map `url()` calls.
|
||||
*
|
||||
* body {
|
||||
* background: url(/images/bg.png);
|
||||
* }
|
||||
*
|
||||
* yields:
|
||||
*
|
||||
* body {
|
||||
* background: url(http://example.com/images/bg.png);
|
||||
* }
|
||||
*
|
||||
*/
|
||||
|
||||
module.exports = function(fn) {
|
||||
return func({
|
||||
url: function(path){
|
||||
path = path.split('"').join('');
|
||||
path = path.split('\'').join('');
|
||||
return 'url("' + fn.call(this, path.trim()) + '")';
|
||||
}
|
||||
}, false);
|
||||
};
|
||||
Loading…
Reference in a new issue