Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Static Asset Hashing #1114

Merged
merged 3 commits into from
Oct 10, 2017
Merged

Static Asset Hashing #1114

merged 3 commits into from
Oct 10, 2017

Conversation

JPOak
Copy link
Contributor

@JPOak JPOak commented Oct 9, 2017

@olefredrik @colin-marshall Hey guys, take your time on this one. Please review as a possible new feature. Cachebusting has been discussed in the past. However, I believe @olefredrik said it needed to be automatic and use hashing.

A few things:

  1. It is using gulp_rev as reflected in the package.json . So, please update your installed packages.
  2. By default hashing is turned OFF to give users the choice to use or not to use. To test, go to line 27 of the gulp file and change to "true".
  3. Hashing will work on the "npm run build" and "npm run dev" commands. It will not on the start command with browsersync. This is by design.
  4. I like the manifest.json file split out, but it is possible to combine, which might make the enqueing functions tighter, but I didn't mind it.

I tested this with hashing turned on and off. Changing scss and simple alert messages in the JS. Hashing will only change if there are actual changes in the files.

Anyways, thinking this might be a cool feature in your framework. Or something like it.

@olefredrik olefredrik merged commit 05877e3 into olefredrik:master Oct 10, 2017
@olefredrik
Copy link
Owner

@JPOak : Thank you for this!! Awesome stuff! Works like a charm. You're the hero of the day 🥇

@colin-marshall
Copy link
Collaborator

Haven’t tested yet, but one suggestion I would make is to move the REVISIONING variable to the config file. There’s no reason for us to store options across multiple files.

Nice work @JPOak!

@JPOak JPOak deleted the static-asset-hashing branch October 10, 2017 16:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants