about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/web-apps/discourse/prebuild-theme-transpiler.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/web-apps/discourse/prebuild-theme-transpiler.patch')
-rw-r--r--nixpkgs/pkgs/servers/web-apps/discourse/prebuild-theme-transpiler.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/web-apps/discourse/prebuild-theme-transpiler.patch b/nixpkgs/pkgs/servers/web-apps/discourse/prebuild-theme-transpiler.patch
new file mode 100644
index 000000000000..bed44baee570
--- /dev/null
+++ b/nixpkgs/pkgs/servers/web-apps/discourse/prebuild-theme-transpiler.patch
@@ -0,0 +1,21 @@
+diff --git a/lib/discourse_js_processor.rb b/lib/discourse_js_processor.rb
+index 26d142fa4d..6040aba6f4 100644
+--- a/lib/discourse_js_processor.rb
++++ b/lib/discourse_js_processor.rb
+@@ -68,7 +68,7 @@ class DiscourseJsProcessor
+     TRANSPILER_PATH =
+       (
+         if Rails.env.production?
+-          "tmp/theme-transpiler.js"
++          "app/assets/javascripts/theme-transpiler.js"
+         else
+           "tmp/theme-transpiler/#{Process.pid}.js"
+         end
+@@ -87,6 +87,6 @@ class DiscourseJsProcessor
+         "node",
+         "app/assets/javascripts/theme-transpiler/build.js",
+         TRANSPILER_PATH,
+-      )
++      ) if !Rails.env.production? or !File.file?(TRANSPILER_PATH)
+       TRANSPILER_PATH
+     end