mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Use .hbr for raw template file extension (#8883)
This commit is contained in:
committed by
GitHub
parent
78a0ca53bf
commit
3e89774908
@@ -497,10 +497,12 @@ class Plugin::Instance
|
||||
root_path = "#{File.dirname(@path)}/assets/javascripts"
|
||||
DiscoursePluginRegistry.register_glob(root_path, 'js.es6')
|
||||
DiscoursePluginRegistry.register_glob(root_path, 'hbs')
|
||||
DiscoursePluginRegistry.register_glob(root_path, 'hbr')
|
||||
|
||||
admin_path = "#{File.dirname(@path)}/admin/assets/javascripts"
|
||||
DiscoursePluginRegistry.register_glob(admin_path, 'js.es6', admin: true)
|
||||
DiscoursePluginRegistry.register_glob(admin_path, 'hbs', admin: true)
|
||||
DiscoursePluginRegistry.register_glob(admin_path, 'hbr', admin: true)
|
||||
end
|
||||
|
||||
self.instance_eval File.read(path), path
|
||||
@@ -643,7 +645,7 @@ class Plugin::Instance
|
||||
Dir.glob("#{root_path}/**/*") do |f|
|
||||
if File.directory?(f)
|
||||
yield [f, true]
|
||||
elsif f.to_s.ends_with?(".js.es6") || f.to_s.ends_with?(".hbs")
|
||||
elsif f.to_s.ends_with?(".js.es6") || f.to_s.ends_with?(".hbs") || f.to_s.ends_with?(".hbr")
|
||||
yield [f, false]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user