class SvelteOnRails::Generators::InstallGenerator

def hello_world

def hello_world
  return unless options[:hello_world] || options[:full]
  puts '-' * 80
  puts ' ▶︎▶︎▶︎︎ INSTALLING Hello World component'
  puts '-' * 80
  hw_i = SvelteOnRails::Installer::HelloWorld
  utils_i = SvelteOnRails::Installer::Utils
  utils_i.add_route("  get \"svelte_on_rails_hello_world/web_socket\"", app_root: Rails.root)
  utils_i.add_route("  get \"svelte_on_rails_hello_world/web_socket_action\"", app_root: Rails.root)
  npm_i = SvelteOnRails::Installer::Npm
  npm_i.install_or_update_package('axios')
  npm_i.install_or_update_package('@rails/actioncable')
  js_i = SvelteOnRails::Installer::Javascript
  init_stat = '../initializers/actionCable.js'
  js_i.append_import_statement(application_js_path, init_stat, "import '#{init_stat}';")
  @hello_world_path = hw_i.install_hello_world(['all_features_test'], app_root: nil, force: true, silent: true)
end