al-quran.reflectslight.io/rules/pages/surah/stream.rules

40 lines
1.1 KiB
Text
Raw Normal View History

#!/usr/bin/env ruby
2023-03-10 13:10:52 +01:00
#
2023-03-10 12:16:41 +01:00
# Rules for the surah stream available at /<locale>/<name>/
# (eg /ar/al-fatihah/) and its dependencies.
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|
2023-03-10 10:47:35 +01:00
compile "/html/pages/surah/stream.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
2023-03-10 10:47:35 +01:00
compile "/js/pages/surah/stream.tsx" do
filter :webpack, depend_on: ["/js/components", "/js/lib/[!WebPackage]/", "/js/hooks"]
2023-03-10 10:47:35 +01:00
write "/js/pages/surah/stream.js"
filter :gzip_text
2023-03-10 10:47:35 +01:00
write "/js/pages/surah/stream.js.gz"
end
2023-03-10 10:47:35 +01:00
compile "/js/pages/surah/stream/loader.ts" do
filter :webpack, depend_on: "/js/lib/WebPackage"
2023-03-10 10:47:35 +01:00
write "/js/pages/surah/stream/loader.js"
end
2023-03-10 10:47:35 +01:00
compile "/css/pages/surah/stream.scss" do
filter :sass, syntax: :scss, style: :compact
filter :rainpress
2023-03-10 10:47:35 +01:00
write("/css/pages/surah/stream.css")
end