gulp-modify-css-urls
Gulp plugin for modifying CSS URLs
Install
npm install --save-dev gulp-modify-css-urls
Usage
ES2015
/* gulpfile.babel.js */;; /* style.cssbody { background-image: url('images/logo.png');}*/gulp;/* style.cssbody { background-image: url('https://fancycdn.com/app/images/logo.png?cache-buster');}*/
ES5
/* gulpfile.js */var gulp = modifyCssUrls = ; /* style.cssbody { background-image: url('images/logo.png');}*/gulp;/* style.cssbody { background-image: url('https://fancycdn.com/app/images/logo.png?cache-buster');}*/
Options
modify
A function that is passed the current URL and file path and then returns the modified URL to replace the existent URL.
The modify function is always ran before append and prepend options.
append
A string that is appended to every URL.
prepend
A string that is prepended to every URL.
License
MIT