An open API service indexing awesome lists of open source software.

https://github.com/othree/gulp-path-modifier

Modify relative url of selected HTML nodes
https://github.com/othree/gulp-path-modifier

Last synced: over 1 year ago
JSON representation

Modify relative url of selected HTML nodes

Awesome Lists containing this project

README

          

Modify relative url of selected elements

USAGE
-----

function modifier(link) {
"use strict";
if (link && !/^((http|https|ftp|rtsp|mms):)?\/\//.test(link)) {
return '/appended-path' + link;
}
return link;
}

gulp.task('default', function () {
"use strict";

gulp.src('./cases/*.html')
.pipe(modf('img', modifier))
.pipe(gulp.dest('./output'));
});

LICENSE
-------

MIT