jamesknelson / gulp-rev-replace

Rewrite occurences of filenames which have been renamed by gulp-rev
MIT License
389 stars 62 forks source link

Prefix, Replacement, Scheme, Manifest, and Unfound file features #11

Open AlexRiedler opened 9 years ago

AlexRiedler commented 9 years ago

Taking some ideas from: gulp-asset which combines a bunch of things into one...

  1. Prefix's for searched terms match all starting with the scheme asset (could just be a string for simplicity) e.g. asset://myspecial/images/file.png I could see this potentially being abused instead of using gulp-rename ... so maybe just have the scheme option?
  2. Prefix set for replaced terms (e.g. content delivery networks) from: asset://myspecial/images/file.png to: http://mycdn.website.com/myspecial/images/file.png
  3. Read rev'd files from manifest as an option; this is better then using gulp-rev-collector or gulp-clone in my opinion.
  4. Detection of unfound files (this should be an option, potentially a regex); warnings? vs. errors? if it matches the scheme, but the file is not rev'd, and it is is not in the "excluded" set of local files. or something of that nature. (might have to think this one through a bit more).

I would be willing to implement them; just curious what people think about them that use this library etc. Should it be included in this library? if not, is there any library? ...

aquilax commented 9 years ago

This will be pretty useful to me, especially first two points. I'm trying to set CDN domain for the assets and still haven't found good solution.