class Importmap::Packager
def remove_package_from_importmap(package)
def remove_package_from_importmap(package) all_lines = File.readlines(@importmap_path) with_lines_removed = all_lines.select { |line| line !~ /pin "#{package}"/ } File.open(@importmap_path, "w") do |file| with_lines_removed.each { |line| file.write(line) } end end