Gzip the `.html` files.
This commit is contained in:
parent
f27daa75fe
commit
a3985fde39
|
@ -9,9 +9,9 @@ task :prod => [:prep] do
|
||||||
sh 'find public -type f -name "*.gz" -delete'
|
sh 'find public -type f -name "*.gz" -delete'
|
||||||
|
|
||||||
Find.find("#{Dir::pwd}/public") do |f|
|
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 "gzip -c #{f} > #{f}.gz"
|
||||||
sh "rm #{f}"
|
# sh "rm #{f}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,9 @@ task :stag => [:prep] do
|
||||||
sh 'find public -type f -name "*.gz" -delete'
|
sh 'find public -type f -name "*.gz" -delete'
|
||||||
|
|
||||||
Find.find("#{Dir::pwd}/public") do |f|
|
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 "gzip -c #{f} > #{f}.gz"
|
||||||
sh "rm #{f}"
|
# sh "rm #{f}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue