Sha256: d6d1c413fc1e46a005ffb0127d3c30507095dc494adca35e9f6af8d95d61e48b
Contents?: true
Size: 743 Bytes
Versions: 14
Compression:
Stored size: 743 Bytes
Contents
say "Create controllers directory" empty_directory "app/javascript/controllers" copy_file "#{__dir__}/app/javascript/controllers/index_for_node.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" if (Rails.root.join("app/javascript/application.js")).exist? say "Import Stimulus controllers" append_to_file "app/javascript/application.js", %(import "./controllers"\n) else say %(You must import "./controllers" in your JavaScript entrypoint), :red end say "Install Stimulus" run "yarn add @hotwired/stimulus"
Version data entries
14 entries across 14 versions & 1 rubygems