mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 23:31:18 +08:00
FIX: Allow plugins to provide test directories with transpiled .js
This commit is contained in:
@ -12,8 +12,9 @@
|
||||
Discourse.plugins.each do |p|
|
||||
root_path = "#{File.dirname(p.path)}/test/javascripts"
|
||||
|
||||
Dir.glob(root_path + '/**/**.es6').each do |f|
|
||||
require_asset(f)
|
||||
end
|
||||
to_glob = [root_path + '/**/**.es6']
|
||||
to_glob << (root_path + '/**/**.js') if p.transpile_js
|
||||
|
||||
Dir.glob(to_glob) { |f| require_asset(f) }
|
||||
end
|
||||
%>
|
||||
|
Reference in New Issue
Block a user