mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 20:34:32 +08:00
21 lines
569 B
Plaintext
21 lines
569 B
Plaintext
<%
|
|
DiscoursePluginRegistry.javascripts.each { |js| require_asset(js) }
|
|
DiscoursePluginRegistry.handlebars.each { |hb| require_asset(hb) }
|
|
DiscoursePluginRegistry.each_globbed_asset do |f, ext|
|
|
if File.directory?(f)
|
|
depend_on(f)
|
|
elsif f.to_s.end_with?(".#{ext}")
|
|
require_asset(f)
|
|
end
|
|
end
|
|
|
|
Discourse.plugins.each do |p|
|
|
root_path = "#{File.dirname(p.path)}/test/javascripts"
|
|
|
|
to_glob = [root_path + '/**/**.es6']
|
|
to_glob << (root_path + '/**/**.js') if p.transpile_js
|
|
|
|
Dir.glob(to_glob) { |f| require_asset(f) }
|
|
end
|
|
%>
|