module SvelteOnRails

def self.run_replace_hello_world_task

def self.run_replace_hello_world_task
  # Ensure Rake tasks are loaded
  Rake::Task.define_task(:environment) # Define a dummy environment task (if needed)
  load File.expand_path('../rakefile', __FILE__) # Load the gem's Rakefile
  # Invoke the task
  Rake::Task['svelte_on_rails:replace_test_app_hello_world'].invoke
rescue StandardError => e
  puts "Error running replace_test_app_hello_world task: #{e.message}"
end