gulp-path-modifier

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i gulp-path-modifier

Weekly Downloads

1

Version

0.0.1

License

none

Last publish

Collaborators

  • othree