Class: Svelte::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Svelte::InstallGenerator
- Defined in:
- lib/generators/svelte/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#install ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/generators/svelte/install_generator.rb', line 7 def install copy_file "initializer.rb", "config/initializers/svelte.rb" insert_into_file "app/views/layouts/application.html.erb", "\n <%= svelte_tags %>", after: "<head>" `npm link #{Gem::Specification.find_by_name("actionview-svelte-handler").gem_dir} --save` `npm install` end |