-
Notifications
You must be signed in to change notification settings - Fork 62
Not manifesting/versioning CSS & JS #33
Comments
Good question. That's actually intentional... or at least it was at one point. Originally, I was recommending including the generated css and js files into In the original version of this based on gulp-starter. I'm revisioning in multiple steps.
If we versioned everything at the same time, the hash of the css and js files wouldn't change as a result of referenced assets changing, and you could have cached files being served pointing to old filenames. But I guess I stripped out those later steps and decided to let Rails handle that bit. Not sure if I still agree with that decision or not, but that's the state of things. At some point, I need to get this up to date with gulp-starter |
@greypants thanks for the response. I'm using gulp-rails-pipeline for my app but I'm not using browserify--I'm still doing AMD modules. My rev-manifest.json has a font file, my one graphic file, a CSS sourcemap, and a js file named bind.polyfill.js, which I guess gets past your pattern in the commit referenced above. Was your intention to have your gulp pipeline create the global.js bundle and the Sass-ified CSS file, and then have the developer =require them in application.js and application.css? So if I were to build my JS file on the gulp side and then require it from the Rails side, the revving should work? Thanks for any advice you can offer--I love the project and your Viget blog, which has helped me a number of times. |
@davidham yep, that's the gist of it. Rails's |
@greypants Would your new webpack tasks from gulp-starter-2 work in gulp-rails-pipeline, like in place of browserify/watchify? I had been thinking of getting started with webpack because I can still use my AMD files. Thanks again! |
The file and configuration structure has changed quite a bit, so just doing a drop in replacement might require some figuring out, but yeah, that could work. I'll try to get this thing up to date in the next week, once I get gulp-starter 2.0 merged into master... which will be this week! |
Sounds awesome! I got gulp-starter-2 working with my Rails app, seems like it's pretty straightforward and mostly driven by the path settings in the config file. Nice work! |
@davidham yesssssss! That is music to my ears. So good to hear. |
Not sure if this is intentional or not, but I'm adapting this to my project and realized since the font versioning fix this (this commit: bf106ea#diff-e88ef86846aa4dbfb9831f43405256fd) seems to be excluding CSS and JS files because of this line:
https://github.com/vigetlabs/gulp-rails-pipeline/blob/master/gulp/tasks/rev/rev-assets.js#L7
I can't get this project to run locally so I can't test for sure, but it seems unintentional to me.
The text was updated successfully, but these errors were encountered: