stimulus-rails 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ccf391e30e2e3ec0f91bdc894bba78582341c77dc33917dc094863f95767172
4
- data.tar.gz: ac90fc101aabdf0e027bd281e69ab5d709116dc8d7a8200c258198d932534aeb
3
+ metadata.gz: 723e63c957d1d8a4ab833a4edb197f2379d4604ee68b7587e8bb85560f568ecb
4
+ data.tar.gz: efe60efa445d404fdf3faf067223eb6ff187d4d41665cc7c78129b54abb94632
5
5
  SHA512:
6
- metadata.gz: 1ff414d0de6993b78d077961f136d7f2cf72a5966a698ad0713698e96a14c40c70d46ca6c95cd575e14a3dfb044e0ac05dd784db268201b17fc067ab923ab5d1
7
- data.tar.gz: 7f8f2e9a41e88ec03fdc936fadacaa109dd10890e6797cdd6d7b2484dc3eb746c31ee9d1fa07265ad5cf3e3ab87b40dd42efcddc87044eaa29ee897344ada441
6
+ metadata.gz: f8ea0462b55efd12f2cee6c70fd08a4efeafbb2840deb91fcfb3e2dba7fd7e2c014ec0f1a5b0c5f9906aa997a26fa7db1cb21620412d86faab0b7078226399c7
7
+ data.tar.gz: 51300cbb38d24cbd24acc9a835e97bd744702325e18396af174e2c3601597319574860e0c318373c632951e9e81f605c0cecd18d0fb63ded358fbb9d538cd0ee
data/README.md CHANGED
@@ -17,7 +17,7 @@ The last command will:
17
17
  1. Create an example controller in `app/assets/javascripts/controllers/hello_controller.js`
18
18
  2. Append the include tags to the `<head>` of your `app/views/layouts/application.html.erb`.
19
19
  3. Initialize your `importmap.json` in `app/assets/javascripts/importmap.json.erb`.
20
- 4. Ensure JavaScript is included in your `app/config/manifest.js` file for compilation.
20
+ 4. Ensure JavaScript is included in your `app/assets/config/manifest.js` file for compilation.
21
21
 
22
22
 
23
23
  ## Usage
@@ -2,7 +2,7 @@ say "Copying Stimulus JavaScript"
2
2
  directory "#{__dir__}/app/assets/javascripts", "app/assets/javascripts"
3
3
  empty_directory_with_keep_file "app/assets/javascripts/libraries"
4
4
 
5
- say "Add app/javascripts to asset pipeline manifest"
5
+ say "Add app/assets/javascripts to asset pipeline manifest"
6
6
  append_to_file Rails.root.join("app/assets/config/manifest.js").to_s, "//= link_tree ../javascripts\n"
7
7
 
8
8
  APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
@@ -7,6 +7,8 @@ module Stimulus::ImportmapHelper
7
7
  Array(paths).flat_map do |path|
8
8
  if (absolute_path = Rails.root.join(path)).exist?
9
9
  absolute_path.children.collect do |module_filename|
10
+ next unless module_filename.extname =~ /js(m)?$/
11
+
10
12
  module_name = importmap_module_name_from(module_filename)
11
13
  module_path = asset_path("#{absolute_path.basename.to_s}/#{module_filename.basename}")
12
14
 
@@ -1,3 +1,3 @@
1
1
  module Stimulus
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimulus-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stephenson