-
Notifications
You must be signed in to change notification settings - Fork 708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add revision to static asset #255
Comments
There is a recipe for this, but I think you're right, maybe we should implement this. |
in generator(grunt)-webapp it's by default |
Yeah, it would be nice if it was implemented here, too. The main problem is that I haven't figured out a way to rev all the assets, not just CSS & JS. Gulp is not very good at this stuff 😞 Otherwise I would implement it right away. |
I'm working on a solution using I'll make a pull-request once I have it successfully working on my local install, should be around this weekend |
Great! 👍 |
I have a first-setup working, but there's a bug that rev-all can't rewrite references in minified html files. Also, the current setup leaves revved and unrevved files in the dist (the latter should get removed) A simple solution would be to move the html-minify line to a separate task, and use something like gulp-napkin to remove unrevved files. But what I'd like to propose is a little bit more involved than the most simple solution:
I prefer this as it separates |
Could you post an example of how would that |
hmm, strike that task. So:
|
If this would help revving, I'm all for it. But I think it's best to perform it on the |
My vision is:
That way the dist always has the latest and greatest, ready for deployment. The .tmp is a temporary dir where we collect everything before we rev it and copy it to dist.
|
pull-request #293 uses the short-solution: It uses I have never done any testing -- I know, rather shamefull -- but I'm using this on my own project, and it works. |
Have you tried using the |
wasn't aware of |
I tried out Tbh. I can see |
I've got something with rev-replace running, but it actually removes the revved files, and leaves the un-revved files alone. Exactly the opposite we want :) Might be my current implementation, I'm not using a manifest file. When I did that, I got an |
I was using it before and it worked fine. Maybe it gets screwed up when not replacing in the same stream as the one where revving is done? |
I've been using |
@silvenon that's actually what I'm doing :) All in the same stream... I should learn how to read:
We don't need that. Since we export all files to
Depending on the ignore list, it removes only the files that are actually revved. Thus in my defaults it ignores index.html in revving, However, like I said in an earlier post, if we export all files to |
But that's not really a problem if you properly do the tasks that will fix the assets, I never have non-revved assets in my dist-folder so Also, I thought that |
I will friendly refer you to my earlier message of 4 hours ago, which literally mentions this in the last sentence, or the message of 5 days ago where I mention this as well.
I'm not using
I can recommend that you try it as well, you'll see how remarkably well it works 😄 |
Yes, I do realise that, I started writing my comment as I was reading and didn't spot it before I reached the end. I am also using |
I'm sorry for the non-response. I'm picking this up today |
Some news about that? |
@illycz no. 😕 We should really solve this, but Gulp isn't a good tool for this task. |
References
The text was updated successfully, but these errors were encountered: