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

Writing a manifest file with mappings without hash for development #201

Closed majkelcc closed 8 years ago

majkelcc commented 8 years ago

Description

I'm working on using the same code in development and production in my rails app for greater good. What I need is a rev-manifest.json file which in development environment would not contain hashes, like this:

{
    "example.js": "example.js"
}

This would allow me to be sure that on production my asset will be compiled and present in rev-manifest file.

Now I'm thinking what would be the best thing to achieve this. Maybe I could pass an argument to gulp-rev function telling it whether the hash should be generated or not. This way I would have one piece of code creating the manifest file in my gulpfile. I'm not an everyday js developer, but I could try to implement it. But just wanted to ask for advices first 😉

lukeed commented 8 years ago

See end of #169 for how to handle the hash-naming in a custom way. In your case, you wouldn't use the hash name at all.