2023-03-10 05:46:02 +01:00
|
|
|
#!/usr/bin/env ruby
|
2023-03-11 18:31:44 +01:00
|
|
|
# frozen_string_literal: true
|
2023-03-10 14:51:34 +01:00
|
|
|
|
|
|
|
##
|
2023-03-10 14:41:19 +01:00
|
|
|
# Rules for the surah index available at /<locale>/ (eg /en/) and its
|
|
|
|
# dependencies.
|
2023-03-10 05:46:02 +01:00
|
|
|
|
|
|
|
locales.each do |locale|
|
|
|
|
compile "/html/pages/surah/index.html.erb", rep: "/#{locale}/surah/index" do
|
2023-10-05 17:23:37 +02:00
|
|
|
context = Ryo.from(locale:)
|
|
|
|
filter(:erb, locals: {context:})
|
2023-03-11 18:31:44 +01:00
|
|
|
write "/#{locale}/index.html"
|
2023-03-10 05:46:02 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
compile "/js/pages/surah/index.tsx" do
|
2023-03-10 14:41:19 +01:00
|
|
|
filter :webpack, depend_on: ["/js/components",
|
|
|
|
"/js/lib/[!WebPackage]/",
|
|
|
|
"/js/hooks"]
|
2023-03-10 05:46:02 +01:00
|
|
|
write "/js/pages/surah/index.js"
|
2023-06-30 00:49:42 +02:00
|
|
|
filter :gzip
|
2023-03-10 05:46:02 +01:00
|
|
|
write "/js/pages/surah/index.js.gz"
|
|
|
|
end
|
|
|
|
|
|
|
|
compile "/js/pages/surah/index/loader.ts" do
|
|
|
|
filter :webpack, depend_on: "/js/lib/WebPackage"
|
|
|
|
write "/js/pages/surah/index/loader.js"
|
|
|
|
end
|
|
|
|
|
|
|
|
compile "/css/pages/surah/index.scss" do
|
|
|
|
filter :sass, syntax: :scss, style: :compact
|
|
|
|
filter :rainpress
|
|
|
|
write("/css/pages/surah/index.css")
|
|
|
|
end
|