Sha256: 8e861ff5cab275610c4c91649cdc7e7d1d65a6752439f13ec987b084fb9ad6bf
Contents?: true
Size: 816 Bytes
Versions: 3
Compression:
Stored size: 816 Bytes
Contents
say "Create controllers directory" empty_directory "app/javascript/controllers" copy_file "#{__dir__}/app/javascript/controllers/index_for_importmap.js", "app/javascript/controllers/index.js" copy_file "#{__dir__}/app/javascript/controllers/application.js", "app/javascript/controllers/application.js" copy_file "#{__dir__}/app/javascript/controllers/hello_controller.js", "app/javascript/controllers/hello_controller.js" say "Import Stimulus controllers" append_to_file "app/javascript/application.js", %(import "controllers"\n) say "Pin Stimulus" append_to_file "config/importmap.rb" do <<-RUBY pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true pin_all_from "app/javascript/controllers", under: "controllers" RUBY end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
stimulus-rails-1.0.2 | lib/install/stimulus_with_importmap.rb |
stimulus-rails-1.0.0 | lib/install/stimulus_with_importmap.rb |
stimulus-rails-0.7.3 | lib/install/stimulus_with_importmap.rb |