class Coupdoeil::InstallGenerator

def add_with_node

def add_with_node
  if Rails.root.join("app/javascript/application.js").exist?
    say("Import Coupdoeil")
    append_to_file("app/javascript/application.js", %(import "coupdoeil"\n))
  else
    say("You must import coupdoeil in your JavaScript entrypoint file", :red)
  end
  say("Install Coupdoeil")
  run("yarn add coupdoeil")
end