28 lines
680 B
Text
28 lines
680 B
Text
|
#!/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(dir: tdata[locale].dir, locale:, locales:)
|
||
|
filter(:erb, {locals: {context:}})
|
||
|
filter(:tidy, exe: tidy)
|
||
|
write "/#{locale}/index.html"
|
||
|
end
|
||
|
end
|
||
|
|
||
|
compile "/js/main/surah-index.tsx" do
|
||
|
filter :webpack,
|
||
|
argv: ["--config", "etc/webpack.#{buildenv}.js"],
|
||
|
depend_on: [
|
||
|
"/js/components",
|
||
|
"/js/lib",
|
||
|
"/js/hooks",
|
||
|
"/css"
|
||
|
]
|
||
|
write "/js/main/surah-index.js"
|
||
|
end
|