class ViteRuby::CLI::Install

def install_gitignore

Internal: Adds compilation output dirs to git ignore.
def install_gitignore
  return unless (gitignore_file = root.join('.gitignore')).exist?
  append(gitignore_file, <<~GITIGNORE)
    # Vite Ruby
    /public/vite*
    node_modules
    # Vite uses dotenv and suggests to ignore local-only env files. See
    # https://vitejs.dev/guide/env-and-mode.html#env-files
    *.local
  GITIGNORE
end