al-quran.reflectslight.io/nanoc/rules/index.rules

36 lines
923 B
Text
Raw Normal View History

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/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:)
filter(:erb, locals: {context:})
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
compile "/js/loaders/SurahIndexLoader.ts" do
2024-03-16 08:17:49 +01:00
filter :webpack
write "/js/loaders/surah-index-loader.js"
2023-03-10 05:46:02 +01:00
end
compile "/css/pages/SurahIndex.scss" do
2023-03-10 05:46:02 +01:00
filter :sass, syntax: :scss, style: :compact
filter :rainpress
write("/css/surah-index.css")
2023-03-10 05:46:02 +01:00
end