stimulus-rails 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/install/stimulus.rb +1 -1
- data/lib/stimulus/importmap_helper.rb +7 -6
- data/lib/stimulus/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ccf391e30e2e3ec0f91bdc894bba78582341c77dc33917dc094863f95767172
|
4
|
+
data.tar.gz: ac90fc101aabdf0e027bd281e69ab5d709116dc8d7a8200c258198d932534aeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ff414d0de6993b78d077961f136d7f2cf72a5966a698ad0713698e96a14c40c70d46ca6c95cd575e14a3dfb044e0ac05dd784db268201b17fc067ab923ab5d1
|
7
|
+
data.tar.gz: 7f8f2e9a41e88ec03fdc936fadacaa109dd10890e6797cdd6d7b2484dc3eb746c31ee9d1fa07265ad5cf3e3ab87b40dd42efcddc87044eaa29ee897344ada441
|
data/lib/install/stimulus.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
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
5
|
say "Add app/javascripts to asset pipeline manifest"
|
6
6
|
append_to_file Rails.root.join("app/assets/config/manifest.js").to_s, "//= link_tree ../javascripts\n"
|
@@ -5,14 +5,15 @@ module Stimulus::ImportmapHelper
|
|
5
5
|
|
6
6
|
def importmap_list_from(*paths)
|
7
7
|
Array(paths).flat_map do |path|
|
8
|
-
absolute_path = Rails.root.join(path)
|
9
|
-
|
8
|
+
if (absolute_path = Rails.root.join(path)).exist?
|
9
|
+
absolute_path.children.collect do |module_filename|
|
10
|
+
module_name = importmap_module_name_from(module_filename)
|
11
|
+
module_path = asset_path("#{absolute_path.basename.to_s}/#{module_filename.basename}")
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
%("#{module_name}": "#{asset_path("#{dirname}/#{module_filename.basename}")}")
|
13
|
+
%("#{module_name}": "#{module_path}")
|
14
|
+
end
|
14
15
|
end
|
15
|
-
end.join(",\n")
|
16
|
+
end.compact.join(",\n")
|
16
17
|
end
|
17
18
|
|
18
19
|
private
|
data/lib/stimulus/version.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stimulus-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Stephenson
|
8
8
|
- Javan Mahkmali
|
9
9
|
- David Heinemeier Hansson
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-01-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: 6.0.0
|
29
|
-
description:
|
29
|
+
description:
|
30
30
|
email: david@loudthinking.com
|
31
31
|
executables: []
|
32
32
|
extensions: []
|
@@ -57,7 +57,7 @@ licenses:
|
|
57
57
|
metadata:
|
58
58
|
homepage_uri: https://stimulus.hotwire.dev
|
59
59
|
source_code_uri: https://github.com/hotwired/stimulus-rails
|
60
|
-
post_install_message:
|
60
|
+
post_install_message:
|
61
61
|
rdoc_options: []
|
62
62
|
require_paths:
|
63
63
|
- lib
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
75
|
rubygems_version: 3.1.2
|
76
|
-
signing_key:
|
76
|
+
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: A modest JavaScript framework for the HTML you already have.
|
79
79
|
test_files: []
|