vite_rails 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/vite_rails/tag_helpers.rb +5 -4
- data/lib/vite_rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 836b70a490a2917136f857fb88a3f5f84c1fbc9305b2d4080b7bfb8a4dbc9303
|
|
4
|
+
data.tar.gz: 5fa491c04e0464c3c5d83c22a099e750fcd0509126d7597030aca9c045f9ac1d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92400212e26217861818c4ae16b295e2fd7fa9ef54d500a7361febbc24ee544525e1dbb45a77e50af2155b447dc11a5c2aaf8528fdc42e1ba8cfb6435bdb97ed
|
|
7
|
+
data.tar.gz: 6ae80aa42432c7438653f01f2899299e8979e6b126f9f5d646dbbbe862e7098391689ae3642a30ad079e69f630ace1fbf0383df57c0311894e7c21ff69902d78
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [2.0.9](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@2.0.8...vite_rails@2.0.9) (2021-04-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Allow passing additional attributes to scripts and stylesheets. ([edf6019](https://github.com/ElMassimo/vite_ruby/commit/edf6019fa83646e413f36d289eac89bb2f8042a5))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
## [2.0.8](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@2.0.7...vite_rails@2.0.8) (2021-03-20)
|
|
2
11
|
|
|
3
12
|
|
|
@@ -24,11 +24,12 @@ module ViteRails::TagHelpers
|
|
|
24
24
|
skip_preload_tags: false,
|
|
25
25
|
skip_style_tags: false,
|
|
26
26
|
crossorigin: 'anonymous',
|
|
27
|
+
media: 'screen',
|
|
27
28
|
**options)
|
|
28
29
|
entries = vite_manifest.resolve_entries(*names, type: asset_type)
|
|
29
30
|
tags = javascript_include_tag(*entries.fetch(:scripts), crossorigin: crossorigin, type: type, extname: false, **options)
|
|
30
|
-
tags << vite_preload_tag(*entries.fetch(:imports), crossorigin: crossorigin) unless skip_preload_tags
|
|
31
|
-
tags << stylesheet_link_tag(*entries.fetch(:stylesheets)) unless skip_style_tags
|
|
31
|
+
tags << vite_preload_tag(*entries.fetch(:imports), crossorigin: crossorigin, **options) unless skip_preload_tags
|
|
32
|
+
tags << stylesheet_link_tag(*entries.fetch(:stylesheets), media: media, crossorigin: crossorigin, **options) unless skip_style_tags
|
|
32
33
|
tags
|
|
33
34
|
end
|
|
34
35
|
|
|
@@ -51,11 +52,11 @@ private
|
|
|
51
52
|
end
|
|
52
53
|
|
|
53
54
|
# Internal: Renders a modulepreload link tag.
|
|
54
|
-
def vite_preload_tag(*sources, crossorigin
|
|
55
|
+
def vite_preload_tag(*sources, crossorigin:, **options)
|
|
55
56
|
sources.map { |source|
|
|
56
57
|
href = path_to_asset(source)
|
|
57
58
|
try(:request).try(:send_early_hints, 'Link' => %(<#{ href }>; rel=modulepreload; as=script; crossorigin=#{ crossorigin }))
|
|
58
|
-
tag.link(rel: 'modulepreload', href: href, as: 'script', crossorigin: crossorigin)
|
|
59
|
+
tag.link(rel: 'modulepreload', href: href, as: 'script', crossorigin: crossorigin, **options)
|
|
59
60
|
}.join("\n").html_safe
|
|
60
61
|
end
|
|
61
62
|
end
|
data/lib/vite_rails/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vite_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Máximo Mussini
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-04-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|
|
@@ -81,8 +81,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
|
|
|
81
81
|
licenses:
|
|
82
82
|
- MIT
|
|
83
83
|
metadata:
|
|
84
|
-
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails@2.0.
|
|
85
|
-
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@2.0.
|
|
84
|
+
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails@2.0.9/vite_rails
|
|
85
|
+
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@2.0.9/vite_rails/CHANGELOG.md
|
|
86
86
|
post_install_message:
|
|
87
87
|
rdoc_options: []
|
|
88
88
|
require_paths:
|