vite_rails 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/tag_helpers.rb +11 -0
- 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: 7e1edf19004f473e3926fd24187617149c3c1d95d7849b2ce6e754bd12c710c8
|
4
|
+
data.tar.gz: 92d282223f58f5109abc2b5766cd670c2a6e78e96f1ffd79646ce5fcf250656a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec1c469414cab1afaf05a841d0a7a7fb00d7314a1960c0d8e40b3707a3c0b31de8d59ca745b4ca39807920ac7a3e45dfc29854c3e830a9b2347eaac6dd984a86
|
7
|
+
data.tar.gz: 86a2cd35794dc28f94ca84d1cbb971874a89e4863f44dbab9efa21bf16463d8f66c4d1f56813f3f6d6440e053734591b517cf2eb853dbf82d00a21d94e4c85fd
|
data/CHANGELOG.md
CHANGED
@@ -49,6 +49,17 @@ module ViteRails::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.
|
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: 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-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -82,8 +82,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
|
|
82
82
|
licenses:
|
83
83
|
- MIT
|
84
84
|
metadata:
|
85
|
-
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails@3.0.
|
86
|
-
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@3.0.
|
85
|
+
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails@3.0.3/vite_rails
|
86
|
+
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@3.0.3/vite_rails/CHANGELOG.md
|
87
87
|
post_install_message:
|
88
88
|
rdoc_options: []
|
89
89
|
require_paths:
|