Skip to content

Commit

Permalink
Lazy load radix and remix icon packs
Browse files Browse the repository at this point in the history
  • Loading branch information
AliOsm committed Sep 1, 2024
1 parent 113f778 commit 25d86be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/phlex/icons/radix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ module Icons
module Radix
require_relative 'radix/base'

extend Phlex::Icons::Helper

Dir[File.join(__dir__, 'radix', '*.rb')].each do |file|
next if ['base.rb'].include?(::File.basename(file))

require_relative file
autoload class_name_from_file_path(file), file
end
end
end
Expand Down
4 changes: 3 additions & 1 deletion lib/phlex/icons/remix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ module Icons
module Remix
require_relative 'remix/base'

extend Phlex::Icons::Helper

Dir[File.join(__dir__, 'remix', '*.rb')].each do |file|
next if ['base.rb'].include?(::File.basename(file))

require_relative file
autoload class_name_from_file_path(file), file
end
end
end
Expand Down

0 comments on commit 25d86be

Please sign in to comment.