diff --git a/lib/pretty_text.rb b/lib/pretty_text.rb index 85ba6df90b5..66792e18d8f 100644 --- a/lib/pretty_text.rb +++ b/lib/pretty_text.rb @@ -68,7 +68,7 @@ module PrettyText apply_es6_file(ctx, root_path, Regexp.last_match[2]) elsif l =~ /\/\/= require_tree (\.\/)?(.*)$/ path = Regexp.last_match[2] - Dir["#{root_path}/#{path}/**"].each do |f| + Dir["#{root_path}/#{path}/**"].sort.each do |f| apply_es6_file(ctx, root_path, f.sub(root_path, '')[1..-1].sub(/\.js.es6$/, '')) end end