-
Notifications
You must be signed in to change notification settings - Fork 60
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
Option to use input file checksum as cache buster #32
Conversation
Was just looking for this feature as we already use md5 for our cache busting (albeit in the filename...main.md5.css) before needing bless. 👍 Ping @minlare |
This probably won't be merged in with @paulyoung focusing on the v4 release. |
@davidwindell As of the current v4 branch (without any changes that @paulyoung may have sitting privately) |
Why not? That would make bless unusable for us. |
@davidwindell If you include an md5 in the original file name already you should be safe to disable the cachebusting feature when running bless. |
@davidwindell See #30. tldr; Because a v4 beta is coming soon that does everything more efficiently. |
I was thinking about deprecating the cache buster feature in v4 since I'm sure there are more robust, dedicated tools for that which can be used in conjunction with bless. |
I can't remember where you said this, but wasn't one of the goals of v4 to streamline bless so we can pipe the output to other packages? Such as a more efficient cache buster? EDIT I guess a better way to say this is "make bless a better streaming process" |
The goal of bless has always been to split a CSS file into the optimal size based on the number of selectors. Cache buster was something that got added for convenience along the way but it distracts from the purpose of the tool and couples bless to a different problem. |
I originally meant the changes to v4 specifically, not the goal of the project, though I do agree about keeping the scope of the package small and leave the cache busting to specialized packages. |
So it seems you are saying we will have to run a script to edit the css file's |
@davidwindell - as @rurjur mentioned above:
|
We use rewrite rules so we don't have to change the file name, that leaves the import unbusted |
Have you published stable v4 to npm ? |
@yanyu0517 – I just created #89 to track this. |
Added option to use an MD5 checksum of the input file content as the cache buster hash. The timestamp will be used by default if the
cacheBuster
option is not specified as'checksum'
.Addresses #5