Files
nixpkgs/pkgs/servers/web-apps/discourse/prebuild-theme-transpiler.patch
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

24 lines
758 B
Diff

diff --git a/lib/discourse_js_processor.rb b/lib/discourse_js_processor.rb
index f1642386c5..5a672818da 100644
--- a/lib/discourse_js_processor.rb
+++ b/lib/discourse_js_processor.rb
@@ -54,7 +54,7 @@ class DiscourseJsProcessor
end
class Transpiler
- TRANSPILER_PATH = "tmp/theme-transpiler.js"
+ TRANSPILER_PATH = "app/assets/javascripts/theme-transpiler.js"
@mutex = Mutex.new
@ctx_init = Mutex.new
@@ -75,7 +75,9 @@ class DiscourseJsProcessor
end
def self.build_production_theme_transpiler
- File.write(TRANSPILER_PATH, build_theme_transpiler)
+ if (!Rails.env.production? or !File.file?(TRANSPILER_PATH))
+ File.write(TRANSPILER_PATH, build_theme_transpiler)
+ end
TRANSPILER_PATH
end