Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 23 lines 758 B view raw
1diff --git a/lib/discourse_js_processor.rb b/lib/discourse_js_processor.rb 2index f1642386c5..5a672818da 100644 3--- a/lib/discourse_js_processor.rb 4+++ b/lib/discourse_js_processor.rb 5@@ -54,7 +54,7 @@ class DiscourseJsProcessor 6 end 7 8 class Transpiler 9- TRANSPILER_PATH = "tmp/theme-transpiler.js" 10+ TRANSPILER_PATH = "app/assets/javascripts/theme-transpiler.js" 11 12 @mutex = Mutex.new 13 @ctx_init = Mutex.new 14@@ -75,7 +75,9 @@ class DiscourseJsProcessor 15 end 16 17 def self.build_production_theme_transpiler 18- File.write(TRANSPILER_PATH, build_theme_transpiler) 19+ if (!Rails.env.production? or !File.file?(TRANSPILER_PATH)) 20+ File.write(TRANSPILER_PATH, build_theme_transpiler) 21+ end 22 TRANSPILER_PATH 23 end