41 lines
1 KiB
Ruby
41 lines
1 KiB
Ruby
#!/usr/bin/env ruby
|
|
# frozen_string_literal: true
|
|
|
|
##
|
|
# Contains rules for the surah index available
|
|
# at /<locale>/
|
|
|
|
locales.each do |locale|
|
|
compile "/html/main/surah-index.html.erb", rep: "/#{locale}/surah/index" do
|
|
context = Ryo.from(filename: "surah-index.html.erb", dir: tdata[locale].dir, locale:, locales:)
|
|
filter(:erb, {locals: {locale:, locales:, dir: context.dir, context:}})
|
|
filter(:tidy, exe: tidy)
|
|
write "/#{locale}/index.html"
|
|
end
|
|
end
|
|
|
|
compile "/js/main/surah-index.tsx" do
|
|
filter :webpack, depend_on: [
|
|
"/js/components",
|
|
"/js/lib/",
|
|
"/js/hooks"
|
|
]
|
|
write "/js/main/surah-index.js"
|
|
filter :gzip
|
|
write "/js/main/surah-index.js.gz"
|
|
end
|
|
|
|
compile "/js/loaders/SurahIndexLoader.ts" do
|
|
filter :webpack
|
|
write "/js/loaders/surah-index-loader.js"
|
|
filter :gzip
|
|
write "/js/loaders/surah-index-loader.js.gz"
|
|
end
|
|
|
|
compile "/css/main/SurahIndex.scss" do
|
|
filter :sass, syntax: :scss, style: :compact
|
|
filter :rainpress
|
|
write("/css/main/surah-index.css")
|
|
filter :gzip
|
|
write("/css/main/surah-index.css.gz")
|
|
end
|