def resolve_alternates(load_path, logical_path)
      candidates, deps = super

      dirname = File.join(load_path, logical_path)

      if directory?(dirname)
        filename = File.join(dirname, 'package.json')

        if self.file?(filename)
          deps << build_file_digest_uri(filename)
          read_package_directives(dirname, filename) do |path|
            if file?(path)
              candidates << path
            end
          end
        end
      end

      return candidates, deps
    end
def resolve_alternates(load_path, logical_path)
      candidates, deps = super

      dirname = File.join(load_path, logical_path)

      if directory?(dirname)
        filename = File.join(dirname, 'package.json')

        if self.file?(filename)
          deps << build_file_digest_uri(filename)
          read_package_directives(dirname, filename) do |path|
            if file?(path)
              candidates << path
            end
          end
        end
      end

      return candidates, deps
    end
Internal: Override resolve_alternates to install package.json behavior.

 load_path    - String environment path
 logical_path - String path relative to base

 Returns candiate filenames.