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 ability to generate static gzip files #17
Conversation
Thanks for your pull request. Can you please add tests? |
hey @ixti i added some basic test for the configuration option. i couldn't find any test for the generated files. did i miss something? please point me to some! i'm not sure if if we need a list of mimetypes. i never had this setup where you enabled static gzip only for a few assets, it was always an all or nothing. (YMMV) |
Well, I would set default list to js + css only, but I tend to agree that most of the time it's all or nothing. And we can add it once somebody will hit other than this requirement - leaving true/false for now. Well I can add test by myself, or you can add it close to this one: Also, make |
cool! i will add test and description! |
Thanks! And then I'll publish fresh version! |
Re what types to gzip. I think we will stick to the same logic as Sprockets does for it's manifest: In our case it would be something like: class AssetFile
# ...
def write
# ...
@asset.write_to dest_path
@asset.write_to "#{dest_path}.gz" if zip?
# ...
end
def zip?
@site.assets_config.gzip and @asset.is_a? Sprockets::BundledAsset
end
# ...
end |
Thanks for your help. |
add ability to generate static gzip files
After some considerations - I have made |
hey
i needed to generate static gzip files for nginx. here is the feature
thanks
ben