diff --git a/lib/jsduck/meta_tag_loader.rb b/lib/jsduck/meta_tag_loader.rb index e0c0eef6e25ff0018ac7984b346e3216279b4c35..babf6d76c7cd7304e4dde319d9f29c80213bd359 100644 --- a/lib/jsduck/meta_tag_loader.rb +++ b/lib/jsduck/meta_tag_loader.rb @@ -21,7 +21,10 @@ module JsDuck if path == :builtins load(File.dirname(__FILE__) + "/tag") elsif File.directory?(path) - Dir[path+"/**/*.rb"].each {|file| load_file(file) } + # Sort paths, so they are always loaded in the same order. + # This is important for signatures to always be rendered in + # the same order. + Dir[path+"/**/*.rb"].sort.each {|file| load_file(file) } else load_file(path) end diff --git a/lib/jsduck/meta_tag_registry.rb b/lib/jsduck/meta_tag_registry.rb index 3ad9b79075c77e68c197dc7eacd415bc152c6246..5c4b055d595842cbb7257bb2ada8a740cc8464ee 100644 --- a/lib/jsduck/meta_tag_registry.rb +++ b/lib/jsduck/meta_tag_registry.rb @@ -56,17 +56,9 @@ module JsDuck # (and in order they should be shown in). def signatures if !@signatures - @signatures = [ - :static, - :protected, - :deprecated, - :required, - :template, - :abstract, - :readonly, - ].map do |key| - s = @map[key].signature - s[:key] = key + @signatures = @tags.find_all(&:signature).map do |tag| + s = tag.signature + s[:key] = tag.key s end end