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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ede7e994b9efc576479fa558cef2b7394becd3da260caec53765e692e0df1301
4
- data.tar.gz: 3a999d199170c26c1e8a7764f125209cf3ead26231a14117c517f8b090c42b43
3
+ metadata.gz: 7e1edf19004f473e3926fd24187617149c3c1d95d7849b2ce6e754bd12c710c8
4
+ data.tar.gz: 92d282223f58f5109abc2b5766cd670c2a6e78e96f1ffd79646ce5fcf250656a
5
5
  SHA512:
6
- metadata.gz: 867c4c13da0539166d095dc3cf7bbb52a6d154bbcedf06b93a6136cf40192323d1d6cd1d528b5144a39e6bd363efa33045a650c9d48ad7a9192f2aad1b533f93
7
- data.tar.gz: a93704d6f78a297d00285e9f4b56bd8f6694486a0e451de88fefb44a9fed11c385b74a5b0639ad6d2c1c18e5bebd06eb874745a912b1b1031209ffaf14f1ce4c
6
+ metadata.gz: ec1c469414cab1afaf05a841d0a7a7fb00d7314a1960c0d8e40b3707a3c0b31de8d59ca745b4ca39807920ac7a3e45dfc29854c3e830a9b2347eaac6dd984a86
7
+ data.tar.gz: 86a2cd35794dc28f94ca84d1cbb971874a89e4863f44dbab9efa21bf16463d8f66c4d1f56813f3f6d6440e053734591b517cf2eb853dbf82d00a21d94e4c85fd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [3.0.3](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@3.0.2...vite_rails@3.0.3) (2021-12-22)
2
+
3
+
4
+
1
5
  ## [3.0.2](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@3.0.1...vite_rails@3.0.2) (2021-12-12)
2
6
 
3
7
 
@@ -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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ViteRails
4
- VERSION = '3.0.2'
4
+ VERSION = '3.0.3'
5
5
  end
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.2
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-12 00:00:00.000000000 Z
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.2/vite_rails
86
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@3.0.2/vite_rails/CHANGELOG.md
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: