module ViteRuby::CLI::FileUtils

def _inject_line_before(path, target, contents, finder)

Other tags:
    Api: - private

Other tags:
    Since: - 1.2.11
def _inject_line_before(path, target, contents, finder)
  content = read_lines(path)
  return if content.join.include?(contents)
  i = finder.call(content, path, target)
  content.insert(i, "#{ contents }\n")
  write(path, content)
end