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

Overwrite the originalName in the manifest #227

Closed lukasoppermann closed 7 years ago

lukasoppermann commented 7 years ago

I am using the json from the manifest in a dust template. Sadly dust hiccups with something like css/style.css as an object key. I would like to be able to decide how the object key is created.

From what I see all that would be necessary is to put this line into a function: https://github.com/sindresorhus/gulp-rev/blob/master/index.js#L132 and expose this function to be overwritable in the options object.

@sindresorhus is this correct? What do you think about it?

zhouzi commented 7 years ago

Thanks for the suggestion @lukasoppermann 👍

I'm afraid that would add an option to solve a particular use case, working around an other tool's decision. I'd rather recommend to pre/post-process the output of dust.