sindresorhus / gulp-rev

Static asset revisioning by appending content hash to filenames: `unicorn.css` → `unicorn-d41d8cd98f.css`
MIT License
1.54k stars 217 forks source link

rename rev file use lastIndexOf('.') as extention #226

Closed kylixs closed 7 years ago

kylixs commented 7 years ago

Resolves {ISSUE_ID}

origin rename : /js/jquery-1.9.2.min.js -> /js/jquery-1-<hash>.9.2.min.js

look sucks

What's new?

new rename : /js/jquery-1.9.2.min.js -> /js/jquery-1.9.2.min-<hash>.js
zhouzi commented 7 years ago

Thanks for contributing @kylixs 👍

I'm afraid we can't accept those changes, mostly for two reasons:

  1. Whether the hash should be placed after the file name or before the extension is a matter of opinion. The choice for gulp-rev was to place it after the name, which is especially great for things like source maps. Changing it now would do more harm than good.
  2. We can't add options to satisfy everyone's opinion. It just adds more ways to do the exact same thing and can be confusing.