Rename all test files from JS -> ES6
This commit is contained in:
parent
6a1fe9ff87
commit
2abe85b834
|
@ -36,24 +36,27 @@ class DiscourseJsProcessor
|
|||
return false unless filename.end_with?(".js") || filename.end_with?(".js.erb")
|
||||
|
||||
relative_path = filename.sub(Rails.root.to_s, '').sub(/^\/*/, '')
|
||||
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"
|
||||
|
||||
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}\/[^\/]+\//
|
||||
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