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
|
|
|
|
|
|
|
##
|
2024-03-16 08:56:56 +01:00
|
|
|
# Rules for the surah index available at /<locale>/.
|
2023-03-10 05:46:02 +01:00
|
|
|
|
|
|
|
locales.each do |locale|
|
2023-10-08 10:02:01 +02:00
|
|
|
compile "/html/index.html.erb", rep: "/#{locale}/surah/index" do
|
2024-01-03 19:55:21 +01:00
|
|
|
context = Ryo.from(filename: "index.html.erb", locale:, locales:)
|
2023-10-05 17:23:37 +02:00
|
|
|
filter(:erb, locals: {context:})
|
2023-10-08 00:07:34 +02:00
|
|
|
filter(:tidy)
|
2023-03-11 18:31:44 +01:00
|
|
|
write "/#{locale}/index.html"
|
2023-03-10 05:46:02 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-03-16 08:17:49 +01:00
|
|
|
compile "/js/main/surah-index.tsx" do
|
2023-03-10 14:41:19 +01:00
|
|
|
filter :webpack, depend_on: ["/js/components",
|
2024-03-16 08:17:49 +01:00
|
|
|
"/js/lib/",
|
2023-03-10 14:41:19 +01:00
|
|
|
"/js/hooks"]
|
2024-03-16 08:17:49 +01:00
|
|
|
write "/js/main/surah-index.js"
|
2023-06-30 00:49:42 +02:00
|
|
|
filter :gzip
|
2024-03-16 08:17:49 +01:00
|
|
|
write "/js/main/surah-index.js.gz"
|
2023-03-10 05:46:02 +01:00
|
|
|
end
|
|
|
|
|
2023-10-08 10:02:01 +02:00
|
|
|
compile "/js/loaders/SurahIndexLoader.ts" do
|
2024-03-16 08:17:49 +01:00
|
|
|
filter :webpack
|
2023-10-08 10:02:01 +02:00
|
|
|
write "/js/loaders/surah-index-loader.js"
|
2023-03-10 05:46:02 +01:00
|
|
|
end
|
|
|
|
|
2023-10-08 10:02:01 +02:00
|
|
|
compile "/css/pages/SurahIndex.scss" do
|
2023-03-10 05:46:02 +01:00
|
|
|
filter :sass, syntax: :scss, style: :compact
|
|
|
|
filter :rainpress
|
2023-10-30 00:24:26 +01:00
|
|
|
write("/css/surah-index.css")
|
2023-03-10 05:46:02 +01:00
|
|
|
end
|