Gzip the `.html` files.

This commit is contained in:
Kazuhiro MUSASHI 2020-04-30 23:59:23 +09:00
parent f27daa75fe
commit a3985fde39
2 changed files with 4 additions and 4 deletions

View File

@ -9,9 +9,9 @@ task :prod => [:prep] do
sh 'find public -type f -name "*.gz" -delete'
Find.find("#{Dir::pwd}/public") do |f|
if f =~ /\.(css|js|png|jpg|JPG|PNG|CSS|JS)$/ && FileTest.file?(f)
if f =~ /\.(css|js|png|jpg|html|JPG|PNG|CSS|JS|HTML)$/ && FileTest.file?(f)
sh "gzip -c #{f} > #{f}.gz"
sh "rm #{f}"
# sh "rm #{f}"
end
end

View File

@ -9,9 +9,9 @@ task :stag => [:prep] do
sh 'find public -type f -name "*.gz" -delete'
Find.find("#{Dir::pwd}/public") do |f|
if f =~ /\.(css|js|png|jpg|JPG|PNG|CSS|JS)$/ && FileTest.file?(f)
if f =~ /\.(css|js|png|jpg|html|JPG|PNG|CSS|JS|HTML)$/ && FileTest.file?(f)
sh "gzip -c #{f} > #{f}.gz"
sh "rm #{f}"
# sh "rm #{f}"
end
end