smysnk/gulp-rev-all — pull request #14 by marshall007 (2014-06-11 00:12:45+00:00)
Title: Support arbitrary URL transformations

Similar to #13, but for arbitrary transformations.

**Use case:**
We were running into issues because all of our front-end projects (in seperate repos) share rev'd JS dependencies at the root of our CDN. On deployment, paths like `/lib/**/*.js` needed to be translated to `//cdn.example.com/*..js`. The example below satisfied our requirements.

**Usage:**
```js
gulp.task('default', function () {
gulp.src('dist/**')
.pipe(revall({
transform: function (rev, source, path) {
return '//cdn.example.com/' + path.basename(rev);
}
}))
.pipe(gulp.dest('dist'))
});
```

**Notes:**
`this` refers to `tools` within the transform function, so any helper methods can be called if necessary. This isn't particularly useful for anything other than `this.joinUrlPath()` right now.