al-quran.reflectslight.io/rules/pages/TheSurahPage.rules
0x1eef 29bc167fa0 Split 'Rules' file across multiple files
This change will hopefuly make it easier  to scale the Rules file
over time. Rather than having one file with all rules, there are
multiple files that are categorized.

Ref #2
2023-03-01 22:04:50 -03:00

40 lines
1.1 KiB
Ruby

#!/usr/bin/env ruby
##
# Contains rules that are related to TheSurahPage.html.erb in one
# way or another
compile "/*/*/surah.json" do
write(item.identifier.to_s)
if File.size(item.raw_filename) > (1024 * 10)
filter :gzip_text
write("#{item.identifier}.gz")
end
end
Ryo.each(surah_id_to_name) do |surah_id, slug|
locales.each do |locale|
compile "/html/TheSurahPage.html.erb", rep: "/#{locale}/#{slug}/index.html" do
filter :erb, locals: {locale: locale, surah_id: surah_id}
write "/#{locale}/#{slug}/index.html"
end
end
end
compile "/js/pages/TheSurahPage.tsx" do
filter :webpack, depend_on: ["/js/components", "/js/lib/[!WebPackage]/", "/js/hooks"]
write "/js/pages/TheSurahPage.js"
filter :gzip_text
write "/js/pages/TheSurahPage.js.gz"
end
compile "/js/pages/TheSurahPage/package.ts" do
filter :webpack, depend_on: "/js/lib/WebPackage"
write "/js/pages/TheSurahPage/package.js"
end
compile "/css/pages/TheSurahPage.scss" do
filter :sass, syntax: :scss, style: :compact
filter :rainpress
write("/css/pages/TheSurahPage.css")
end