mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
Revert "Rename all test files from JS -> ES6"
This reverts commit 2abe85b834
.
This commit is contained in:
parent
a42668ead0
commit
4fa580fbd1
|
@ -36,27 +36,24 @@ class DiscourseJsProcessor
|
|||
return false unless filename.end_with?(".js") || filename.end_with?(".js.erb")
|
||||
|
||||
relative_path = filename.sub(Rails.root.to_s, '').sub(/^\/*/, '')
|
||||
|
||||
js_root = "app/assets/javascripts"
|
||||
test_root = "test/javascripts"
|
||||
|
||||
return false if relative_path.start_with?("#{js_root}/locales/")
|
||||
|
||||
return true if %w(
|
||||
preload-store
|
||||
preload-application-data
|
||||
wizard-start
|
||||
onpopstate-handler
|
||||
discourse
|
||||
google-tag-manager
|
||||
google-universal-analytics.js
|
||||
activate-account.js
|
||||
auto-redirect.js
|
||||
embed-application
|
||||
).any? { |f| relative_path == "#{js_root}/#{f}.js" }
|
||||
|
||||
relative_path =~ /^#{js_root}\/[^\/]+\// ||
|
||||
relative_path =~ /^#{test_root}\/[^\/]+\//
|
||||
relative_path.start_with?("app/assets/javascripts/discourse/") ||
|
||||
relative_path.start_with?("app/assets/javascripts/admin/") ||
|
||||
relative_path.start_with?("app/assets/javascripts/pretty-text/") ||
|
||||
relative_path.start_with?("app/assets/javascripts/select-kit/") ||
|
||||
relative_path.start_with?("app/assets/javascripts/wizard/") ||
|
||||
relative_path.start_with?("app/assets/javascripts/discourse-common/") ||
|
||||
relative_path.start_with?("app/assets/javascripts/ember-addons/") ||
|
||||
relative_path.start_with?("app/assets/javascripts/confirm-new-email/") ||
|
||||
relative_path == "app/assets/javascripts/preload-store.js" ||
|
||||
relative_path == "app/assets/javascripts/preload-application-data.js" ||
|
||||
relative_path == "app/assets/javascripts/wizard-start.js" ||
|
||||
relative_path == "app/assets/javascripts/onpopstate-handler.js" ||
|
||||
relative_path == "app/assets/javascripts/discourse.js" ||
|
||||
relative_path == "app/assets/javascripts/google-tag-manager.js" ||
|
||||
relative_path == "app/assets/javascripts/google-universal-analytics.js" ||
|
||||
relative_path == "app/assets/javascripts/activate-account.js" ||
|
||||
relative_path == "app/assets/javascripts/auto-redirect.js" ||
|
||||
relative_path == "app/assets/javascripts/embed-application.js"
|
||||
end
|
||||
|
||||
def self.skip_module?(data)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user