vite_rails_legacy 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/vite_rails_legacy/tag_helpers.rb +11 -0
- data/lib/vite_rails_legacy/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: c2e8422c6d212031f8e62a6af629466e57abe65be76dc13f67b8b1bda2a44119
|
4
|
+
data.tar.gz: 8b6c78104ff090d81efe9640a8df8da4b27e1c31dd44cd96f8ceacde1190c64e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49f75b9e07555742235d2489e523d119a917bd9d0113505dad6a1eb66206856313ab5670bcd6021158a103d7d4b7bc850287f2842f19e2531d482009d3962e87
|
7
|
+
data.tar.gz: 98a12a027a628c0f211658b87fbd0af1c67976755cd3377ab0ba42219bb8ca67184b3aac6bcbb43509d2518c8acfd3dbf7325894eaa71d28112ff1cbce2d7486
|
data/CHANGELOG.md
CHANGED
@@ -49,6 +49,17 @@ module ViteRailsLegacy::TagHelpers
|
|
49
49
|
stylesheet_link_tag(*style_paths, **options)
|
50
50
|
end
|
51
51
|
|
52
|
+
# Public: Renders an <img> tag for the specified Vite asset.
|
53
|
+
def vite_image_tag(name, **options)
|
54
|
+
if options[:srcset] && !options[:srcset].is_a?(String)
|
55
|
+
options[:srcset] = options[:srcset].map do |src_name, size|
|
56
|
+
"#{ vite_asset_path(src_name) } #{ size }"
|
57
|
+
end.join(', ')
|
58
|
+
end
|
59
|
+
|
60
|
+
image_tag(vite_asset_path(name), options)
|
61
|
+
end
|
62
|
+
|
52
63
|
private
|
53
64
|
|
54
65
|
# Internal: Returns the current manifest loaded by Vite Ruby.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vite_rails_legacy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
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-12-
|
11
|
+
date: 2021-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -61,8 +61,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
|
|
61
61
|
licenses:
|
62
62
|
- MIT
|
63
63
|
metadata:
|
64
|
-
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails_legacy@3.0.
|
65
|
-
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails_legacy@3.0.
|
64
|
+
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails_legacy@3.0.3/vite_rails_legacy
|
65
|
+
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails_legacy@3.0.3/vite_rails_legacy/CHANGELOG.md
|
66
66
|
post_install_message:
|
67
67
|
rdoc_options: []
|
68
68
|
require_paths:
|