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

36 lines
950 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
2023-11-12 21:09:57 +01:00
context = Ryo.from(filename: "index.html.erb", locale:)
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
compile "/js/pages/SurahIndex.tsx" do
2023-03-10 14:41:19 +01:00
filter :webpack, depend_on: ["/js/components",
"/js/lib/[!WebPackage]/",
"/js/hooks"]
write "/js/surah-index.js"
2023-06-30 00:49:42 +02:00
filter :gzip
write "/js/surah-index.js.gz"
2023-03-10 05:46:02 +01:00
end
compile "/js/loaders/SurahIndexLoader.ts" do
2023-03-10 05:46:02 +01:00
filter :webpack, depend_on: "/js/lib/WebPackage"
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