gulp-css-url-adjuster
gulp-css-url-adjuster copied to clipboard
Breaks protocol-less urls
This line breaks protocol-less URLs (that start with //), i.e. it changes //example.com
into /example.com
.
I went to fix this, but after seeing how this plugin work I now think a better recipe is just using gulp-rework.
var gulp = require('gulp');
var rework = require('gulp-rework');
var reworkUrl = require('rework-plugin-url');
gulp.task('default', function () {
return gulp.src('src/app.css')
.pipe(rework(reworkUrl(function(url) {
// modifications on url, e.g. using http://medialize.github.io/URI.js/
return url;
))
.pipe(gulp.dest('dist'));
});
I suggest this plugin be deprecated because a combination of gulp-rework
, rework-plugin-url
and a URL mutation library such as URI.js can give the same results.
@tepez I think this is good a suggestion and will update the readme to reflect this