class Svelte::InstallGenerator < Rails::Generators::Base desc "This generator installs actionview-svelte-handler" source_root File.expand_path("templates/install", __dir__) def install copy_file "initializer.rb", "config/initializers/svelte.rb" insert_into_file "app/views/layouts/application.html.erb", "\n <%= svelte_tags %>", after: "" `npm install #{Svelte.gem_dir} --install-links --save=false` end end