Sha256: 5ee667da07ae8ccf038cfb19cb06dcb1cb313dd2508506730389f794749b41f7
Contents?: true
Size: 787 Bytes
Versions: 1
Compression:
Stored size: 787 Bytes
Contents
say "Appending Turbo setup code to #{Webpacker.config.source_entry_path}/application.js" append_to_file "#{Webpacker.config.source_entry_path}/application.js", %(\nimport "@hotwired/turbo-rails"\n) say "Install Turbo" run "yarn add @hotwired/turbo-rails" CABLE_CONFIG_PATH = Rails.root.join("config/cable.yml") if CABLE_CONFIG_PATH.exist? say "Enable redis in bundle" uncomment_lines "Gemfile", %(gem 'redis') say "Switch development cable to use redis" gsub_file CABLE_CONFIG_PATH.to_s, /development:\n\s+adapter: async/, "development:\n adapter: redis\n url: redis://localhost:6379/1" else say 'ActionCable config file (config/cable.yml) is missing. Uncomment "gem \'redis\'" in your Gemfile and create config/cable.yml to use the Turbo Streams broadcast feature.' end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
turbo-rails-0.7.4 | lib/install/turbo_with_webpacker.rb |