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

Change Hash when content don't change #218

Closed herberthenrique closed 7 years ago

herberthenrique commented 7 years ago

Description

For some problems with revision and cache in our server, I need to create a task that change the hash created for file even when the content is the same. Is there a way to do this?

zhouzi commented 7 years ago

Could you elaborate on why you want to do that?

Generating a different hash for the same content would defeat the purpose of gulp-rev. Maybe you can hack your way around by modifying input files content somehow but that would not be ideal.

A better approach, if you really want to generate a new hash for unchanged content, could be to simply rename the files and handle the manifest generation yourself.

But depending on your goal, we may find a better alternative.

I am closing because it's definitely not something gulp-rev is built for but feel free to continue the discussion here. I'll do my best to help 😉