Josiah / gulp-cachebust

Generates checksums and renames references to files, useful for cachebusting
30 stars 11 forks source link

cachebust in included file #4

Open djindjic opened 9 years ago

djindjic commented 9 years ago

I tried to simplify my gulpfile and part it in few smaller, included into main gulpfile. Assets files with finger prints are created but references in index.html are not updated.

Josiah commented 9 years ago

Hmm that's strange, can you provide a sample gist of your gulpfile? It will help me find the issue.

djindjic commented 9 years ago

I have had a problem with it 1 week ago and just leave it all in same file. I have succeeded it this time and it works correctly (my fault sorry), but found only one problem more. If I pipe chachebust after gulp-uncss plugin, css file is created (with finger print) but no full name in index.html (only orginal file name).

I'm not an guru and not sure if it's a problem with uncss or cachebust but I would be grateful if you take a look here: https://github.com/djindjic/generator-gulpular/blob/4aebf55e5127bfeecb7835ed84ae2f23b5ce184c/app/templates/gulp/vendor_util.js#L25

this is my yeoman generator but if you want to clone it, you can just navigate to app/templates and start gulp (default) tast

jitendravyas commented 8 years ago

I'm also having the same problem. css is being generated but reference in html file is not updated

AlexKryzh commented 8 years ago

I have this code in my index.js main file: import CacheBuster from 'gulp-cachebust'; global.cachebust = new CacheBuster();

And when I use it its like this: .pipe(global.cachebust.resources()) & .pipe(global.cachebust.references())

Works fine.