forked from fixin.me/fixin.me
Enable turbo (without Drive)
This commit is contained in:
parent
761aad358a
commit
8c6d296021
3
Gemfile
3
Gemfile
@ -12,6 +12,9 @@ gem "devise"
|
||||
|
||||
gem 'awesome_nested_set'
|
||||
|
||||
gem 'importmap-rails'
|
||||
gem 'turbo-rails'
|
||||
|
||||
group :development, :test do
|
||||
gem "byebug"
|
||||
end
|
||||
|
10
Gemfile.lock
10
Gemfile.lock
@ -98,6 +98,10 @@ GEM
|
||||
activesupport (>= 6.1)
|
||||
i18n (1.14.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
importmap-rails (1.2.3)
|
||||
actionpack (>= 6.0.0)
|
||||
activesupport (>= 6.0.0)
|
||||
railties (>= 6.0.0)
|
||||
loofah (2.21.4)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.12.0)
|
||||
@ -189,6 +193,10 @@ GEM
|
||||
thor (1.3.0)
|
||||
tilt (2.3.0)
|
||||
timeout (0.4.0)
|
||||
turbo-rails (1.5.0)
|
||||
actionpack (>= 6.0.0)
|
||||
activejob (>= 6.0.0)
|
||||
railties (>= 6.0.0)
|
||||
tzinfo (2.0.6)
|
||||
concurrent-ruby (~> 1.0)
|
||||
warden (1.2.9)
|
||||
@ -214,12 +222,14 @@ DEPENDENCIES
|
||||
byebug
|
||||
capybara
|
||||
devise
|
||||
importmap-rails
|
||||
mysql2 (~> 0.5)
|
||||
puma (~> 5.0)
|
||||
rails (~> 7.0.4, >= 7.0.4.2)
|
||||
sassc-rails
|
||||
selenium-webdriver
|
||||
sprockets-rails
|
||||
turbo-rails
|
||||
tzinfo-data
|
||||
web-console
|
||||
|
||||
|
@ -1,2 +1,4 @@
|
||||
//= link_tree ../images
|
||||
//= link_directory ../stylesheets .css
|
||||
//= link_tree ../../javascript .js
|
||||
//= link_tree ../../../vendor/javascript .js
|
||||
|
3
app/javascript/application.js
Normal file
3
app/javascript/application.js
Normal file
@ -0,0 +1,3 @@
|
||||
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
|
||||
import "@hotwired/turbo-rails"
|
||||
Turbo.session.drive = false
|
@ -7,6 +7,7 @@
|
||||
<%= csp_meta_tag %>
|
||||
|
||||
<%= stylesheet_link_tag "application" %>
|
||||
<%= javascript_importmap_tags %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
4
bin/importmap
Executable file
4
bin/importmap
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require_relative "../config/application"
|
||||
require "importmap/commands"
|
4
config/importmap.rb
Normal file
4
config/importmap.rb
Normal file
@ -0,0 +1,4 @@
|
||||
# Pin npm packages by running ./bin/importmap
|
||||
|
||||
pin "application", preload: true
|
||||
pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
|
0
vendor/javascript/.keep
vendored
Normal file
0
vendor/javascript/.keep
vendored
Normal file
Loading…
x
Reference in New Issue
Block a user