Skip to content

Commit 92daa0b

Browse files
committed
Make listing JS files in the import map a predictable order (closes #108)
1 parent eb34334 commit 92daa0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/importmap/map.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def module_path_from(filename, mapping)
149149
end
150150

151151
def find_javascript_files_in_tree(path)
152-
Dir[path.join("**/*.js{,m}")].collect { |file| Pathname.new(file) }.select(&:file?)
152+
Dir[path.join("**/*.js{,m}")].sort.collect { |file| Pathname.new(file) }.select(&:file?)
153153
end
154154

155155
def absolute_root_of(path)

0 commit comments

Comments
 (0)