Closed rferri closed 9 years ago
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. :+1:
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) does not have cachebusting there is no cachebusting support.
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 @import
statement just to add cachebusting onto the file's path every time we run bless. That will be a massive pain!
@davidwindell - as @rurjur mentioned above:
If you include an md5 in the original file name already you should be safe to disable the cachebusting feature when running bless.
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