importmap-rails 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/importmap/importmap_tags_helper.rb +2 -2
- data/lib/importmap/map.rb +1 -1
- data/lib/importmap/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bec8044eff12e2d9ad0a16b077c6aca6c1fd365ebcb218815910c778407f7f91
|
4
|
+
data.tar.gz: c6b5ba9bb3b4e80762c1bdf49030d54504e6c865bab7dd8dda0e6df964ac3637
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f76fcb0a38faba63a48c59c4735d3dc33cc6e24d30e55b689e33e2fb75285461bc7ec7c6684a4325666b3405956069a16c778ad09f26aa40b29d0e05b3fecf3
|
7
|
+
data.tar.gz: 878c7a4bf22f8b130aaa6cd2f14ef84db3cda9924278a825ff7be98e9c3f0c50aa44adf1d87c207dd51239782470a2ca05c9964c00ecd01e0730a3dff169c6f8
|
@@ -3,7 +3,7 @@ module Importmap::ImportmapTagsHelper
|
|
3
3
|
def javascript_importmap_tags(entry_point = "application", importmap: Rails.application.importmap)
|
4
4
|
safe_join [
|
5
5
|
javascript_inline_importmap_tag(importmap.to_json(resolver: self)),
|
6
|
-
javascript_importmap_module_preload_tags(importmap, entry_point:),
|
6
|
+
javascript_importmap_module_preload_tags(importmap, entry_point: entry_point),
|
7
7
|
javascript_import_module_tag(entry_point)
|
8
8
|
], "\n"
|
9
9
|
end
|
@@ -25,7 +25,7 @@ module Importmap::ImportmapTagsHelper
|
|
25
25
|
# (defaults to Rails.application.importmap), such that they'll be fetched
|
26
26
|
# in advance by browsers supporting this link type (https://caniuse.com/?search=modulepreload).
|
27
27
|
def javascript_importmap_module_preload_tags(importmap = Rails.application.importmap, entry_point: "application")
|
28
|
-
javascript_module_preload_tag(*importmap.preloaded_module_paths(resolver: self, entry_point
|
28
|
+
javascript_module_preload_tag(*importmap.preloaded_module_paths(resolver: self, entry_point: entry_point, cache_key: entry_point))
|
29
29
|
end
|
30
30
|
|
31
31
|
# Link tag(s) for preloading the JavaScript module residing in `*paths`. Will return one link tag per path element.
|
data/lib/importmap/map.rb
CHANGED
@@ -42,7 +42,7 @@ class Importmap::Map
|
|
42
42
|
# the different cases.
|
43
43
|
def preloaded_module_paths(resolver:, entry_point: "application", cache_key: :preloaded_module_paths)
|
44
44
|
cache_as(cache_key) do
|
45
|
-
resolve_asset_paths(expanded_preloading_packages_and_directories(entry_point:), resolver:).values
|
45
|
+
resolve_asset_paths(expanded_preloading_packages_and_directories(entry_point: entry_point), resolver: resolver).values
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
data/lib/importmap/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: importmap-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
|
-
rubygems_version: 3.
|
98
|
+
rubygems_version: 3.2.33
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: Use ESM with importmap to manage modern JavaScript in Rails without transpiling
|