Use version of importmap that support loading outside of an app

We are using it in a few scripts, and we were doing workarounds
to be able to use outside an Rails application.

Now the workaround is gone.
This commit is contained in:
Rafael Mendonça França 2023-10-27 14:46:16 +00:00
parent ba7204e693
commit 403447d061
No known key found for this signature in database
GPG Key ID: FC23B6D0F1EEE948
4 changed files with 17 additions and 15 deletions

@ -27,7 +27,7 @@ gem "stimulus-rails"
gem "turbo-rails" gem "turbo-rails"
gem "jsbundling-rails" gem "jsbundling-rails"
gem "cssbundling-rails" gem "cssbundling-rails"
gem "importmap-rails" gem "importmap-rails", ">= 1.2.3"
gem "tailwindcss-rails" gem "tailwindcss-rails"
gem "dartsass-rails" gem "dartsass-rails"
# require: false so bcrypt is loaded only when has_secure_password is used. # require: false so bcrypt is loaded only when has_secure_password is used.

@ -178,8 +178,8 @@ GEM
cgi (0.3.6) cgi (0.3.6)
chef-utils (18.1.29) chef-utils (18.1.29)
concurrent-ruby concurrent-ruby
concurrent-ruby (1.1.10) concurrent-ruby (1.2.2)
connection_pool (2.3.0) connection_pool (2.4.1)
crack (0.4.5) crack (0.4.5)
rexml rexml
crass (1.0.6) crass (1.0.6)
@ -280,12 +280,14 @@ GEM
image_processing (1.12.2) image_processing (1.12.2)
mini_magick (>= 4.9.5, < 5) mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3) ruby-vips (>= 2.0.17, < 3)
importmap-rails (1.1.5) importmap-rails (1.2.3)
actionpack (>= 6.0.0) actionpack (>= 6.0.0)
activesupport (>= 6.0.0)
railties (>= 6.0.0) railties (>= 6.0.0)
io-console (0.6.0) io-console (0.6.0)
irb (1.6.2) irb (1.8.3)
reline (>= 0.3.0) rdoc
reline (>= 0.3.8)
jbuilder (2.11.5) jbuilder (2.11.5)
actionview (>= 5.0.0) actionview (>= 5.0.0)
activesupport (>= 5.0.0) activesupport (>= 5.0.0)
@ -303,7 +305,7 @@ GEM
listen (3.8.0) listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3) rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10) rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.21.3) loofah (2.21.4)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.12.0) nokogiri (>= 1.12.0)
mail (2.8.1) mail (2.8.1)
@ -322,8 +324,8 @@ GEM
memoist (0.16.2) memoist (0.16.2)
mini_magick (4.12.0) mini_magick (4.12.0)
mini_mime (1.1.2) mini_mime (1.1.2)
mini_portile2 (2.8.4) mini_portile2 (2.8.5)
minitest (5.19.0) minitest (5.20.0)
minitest-bisect (1.6.0) minitest-bisect (1.6.0)
minitest-server (~> 1.0) minitest-server (~> 1.0)
path_expander (~> 1.1) path_expander (~> 1.1)
@ -417,7 +419,7 @@ GEM
redis-namespace (1.10.0) redis-namespace (1.10.0)
redis (>= 4) redis (>= 4)
regexp_parser (2.8.2) regexp_parser (2.8.2)
reline (0.3.2) reline (0.3.9)
io-console (~> 0.5) io-console (~> 0.5)
representable (3.2.0) representable (3.2.0)
declarative (< 0.1.0) declarative (< 0.1.0)
@ -526,7 +528,7 @@ GEM
railties (>= 6.0.0) railties (>= 6.0.0)
terser (1.1.13) terser (1.1.13)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
thor (1.2.2) thor (1.3.0)
timeout (0.4.0) timeout (0.4.0)
tomlrb (2.0.3) tomlrb (2.0.3)
trailblazer-option (0.1.2) trailblazer-option (0.1.2)
@ -535,7 +537,7 @@ GEM
actionpack (>= 6.0.0) actionpack (>= 6.0.0)
activejob (>= 6.0.0) activejob (>= 6.0.0)
railties (>= 6.0.0) railties (>= 6.0.0)
tzinfo (2.0.5) tzinfo (2.0.6)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
uber (0.1.0) uber (0.1.0)
unicode-display_width (2.5.0) unicode-display_width (2.5.0)
@ -588,7 +590,7 @@ DEPENDENCIES
delayed_job_active_record delayed_job_active_record
google-cloud-storage (~> 1.11) google-cloud-storage (~> 1.11)
image_processing (~> 1.2) image_processing (~> 1.2)
importmap-rails importmap-rails (>= 1.2.3)
jbuilder jbuilder
jsbundling-rails jsbundling-rails
json (>= 2.0.0) json (>= 2.0.0)

@ -27,7 +27,7 @@ namespace :test do
end end
task :vendor_trix do task :vendor_trix do
module Importmap; end require "importmap-rails"
require "importmap/packager" require "importmap/packager"
packager = Importmap::Packager.new(vendor_path: "app/assets/javascripts") packager = Importmap::Packager.new(vendor_path: "app/assets/javascripts")

@ -38,7 +38,7 @@ namespace :guides do
end end
task :vendor_javascript do task :vendor_javascript do
module Importmap; end require "importmap-rails"
require "importmap/packager" require "importmap/packager"
packager = Importmap::Packager.new(vendor_path: "assets/javascripts") packager = Importmap::Packager.new(vendor_path: "assets/javascripts")