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
- Host: GitHub
- URL: https://github.com/othree/gulp-path-modifier
- Owner: othree
- License: mit
- Created: 2014-03-03T15:27:21.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-05T07:14:00.000Z (over 12 years ago)
- Last Synced: 2025-02-25T04:45:32.636Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://github.com/othree/gulp-path-modifier
- Size: 160 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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