From 982a64225f274bdace8c88727823a811d0f904f7 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sun, 16 Jun 2024 00:04:09 -0300 Subject: [PATCH] Apply 'exe' option to the correct filter --- nanoc/rules/index.rules | 15 +++++++-------- nanoc/rules/random.rules | 4 ++-- nanoc/rules/redirect.rules | 4 ++-- nanoc/rules/stream.rules | 15 +++++++-------- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/nanoc/rules/index.rules b/nanoc/rules/index.rules index 0463ab8..d93c383 100644 --- a/nanoc/rules/index.rules +++ b/nanoc/rules/index.rules @@ -9,25 +9,24 @@ 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) + filter(:tidy, exe: tidy) write "/#{locale}/index.html" end end compile "/js/main/surah-index.tsx" do - filter :webpack, exe: tidy, - depend_on: [ - "/js/components", - "/js/lib/", - "/js/hooks" - ] + 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, exe: tidy + filter :webpack write "/js/loaders/surah-index-loader.js" filter :gzip write "/js/loaders/surah-index-loader.js.gz" diff --git a/nanoc/rules/random.rules b/nanoc/rules/random.rules index b4b3eee..32240e9 100644 --- a/nanoc/rules/random.rules +++ b/nanoc/rules/random.rules @@ -9,13 +9,13 @@ locales.each do |locale| compile "/html/main/random.html.erb", rep: "random/#{locale}" do context = Ryo.from({filename: "random.html.erb", dir: tdata[locale].dir, locale:, locales:}) filter(:erb, locals: {locale:, locales:, dir: context.dir, context:}) - filter(:tidy) + filter(:tidy, exe: tidy) write("/#{locale}/random/index.html") end end compile "/js/main/random.ts" do - filter(:webpack, exe: tidy, depend_on: ["/js/lib/"]) + filter(:webpack, depend_on: ["/js/lib/"]) write("/js/main/random.js") filter(:gzip) write("/js/main/random.js.gz") diff --git a/nanoc/rules/redirect.rules b/nanoc/rules/redirect.rules index c0d89b7..b72619c 100644 --- a/nanoc/rules/redirect.rules +++ b/nanoc/rules/redirect.rules @@ -7,12 +7,12 @@ compile "/html/main/redirect.html.erb" do filter(:erb, locals: {locales:}) - filter(:tidy) + filter(:tidy, exe: tidy) write("/index.html") end compile "/js/main/redirect.ts" do - filter(:webpack, exe: tidy, depend_on: ["/js/lib/"]) + filter(:webpack, depend_on: ["/js/lib/"]) write("/js/main/redirect.js") filter(:gzip) write("/js/main/redirect.js.gz") diff --git a/nanoc/rules/stream.rules b/nanoc/rules/stream.rules index 2a25e6f..f1e63b1 100644 --- a/nanoc/rules/stream.rules +++ b/nanoc/rules/stream.rules @@ -28,7 +28,7 @@ Ryo.each(name_by_id) do |id, slug| surah: context.surah, dir: context.dir, context: } filter(:erb, locals:) - filter(:tidy) + filter(:tidy, exe: tidy) write "/#{locale}/#{pathname}/index.html" end locales.each do |locale| @@ -42,19 +42,18 @@ Ryo.each(name_by_id) do |id, slug| end compile "/js/main/surah-stream.tsx" do - filter :webpack, exe: tidy, - depend_on: [ - "/js/components", - "/js/lib/", - "/js/hooks" - ] + filter :webpack, depend_on: [ + "/js/components", + "/js/lib/", + "/js/hooks" + ] write "/js/main/surah-stream.js" filter :gzip write "/js/main/surah-stream.js.gz" end compile "/js/loaders/SurahStreamLoader.ts" do - filter :webpack, exe: tidy + filter :webpack write "/js/loaders/surah-stream-loader.js" filter :gzip write "/js/loaders/surah-stream-loader.js.gz"