vite_rails 2.0.3 → 2.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6bd0ba71782fc5f805aaa491a323dd54fa53cdb1a4eec20280dac1240ba3eaa
4
- data.tar.gz: 732b25178ea38456fb779e132d3c9b1b3a0d51bf08c09b4bfabb99f91bbb9b03
3
+ metadata.gz: 8abb492c94977c4ce3b0fa8412a6d25fa3fe73b8b5bce3e1736233b7daafecd4
4
+ data.tar.gz: d9846171170239c19634ab50d3a0eab7840ad305f94cded2c49cc5b6ea9a5af6
5
5
  SHA512:
6
- metadata.gz: 681ab6f425a853f1f95a0ee3ef4308c56406b5e298c906f56558ff8898dcc155271de4e80dc2f4bdeb77343651ff24a58c300c4c05748a5ca9177bd0fc4f520d
7
- data.tar.gz: c57fbf21518f89a2c7d171095802feef551422f0c6ac32b4d1a0875d4b4e41e981aac3cb72c4e2df1e7fca301fa5443b6c843eb0cf8c2469ce72720fcd41cf9a
6
+ metadata.gz: d9273818122428faf644437362cdb3951c4dc733c9935e70491b2effcdf1c2544b0e5ff78702d827413d4ba1e18fbb029d013c33bb5c39ca29711d7094faba33
7
+ data.tar.gz: ebef265a9c4d210451a757fe8ac99c01dbd7134c56e6d0587bb7649a7866fc5f810adc1a24f4cfb9b0bfa3f283039b8dddfd4071579b9568a7bab5c0e251c258
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [2.0.5](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@2.0.4...vite_rails@2.0.5) (2021-03-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Using a .jsx extension in a tag helper in development ([a56491b](https://github.com/ElMassimo/vite_ruby/commit/a56491b96720ae537b6b6305aa7efa70cf19e4ee))
7
+
8
+
9
+
10
+ ## [2.0.4](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@2.0.3...vite_rails@2.0.4) (2021-03-09)
11
+
12
+
13
+ ### Features
14
+
15
+ * Detect installations of the latest version of Webpacker (app/packs) ([e9a3bc0](https://github.com/ElMassimo/vite_ruby/commit/e9a3bc02475dbadac77e58b3980a4af8df5aaa02))
16
+
17
+
18
+
1
19
  ## [2.0.3](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@2.0.2...vite_rails@2.0.3) (2021-03-07)
2
20
 
3
21
  - Add a bounded requirement to `vite_ruby` dependency.
@@ -10,8 +10,8 @@ module ViteRails::Installation
10
10
  # Override: Setup a typical apps/web Hanami app to use Vite.
11
11
  def setup_app_files
12
12
  cp RAILS_TEMPLATES.join('config/rails-vite.json'), config.config_path
13
- if root.join('app/javascript').exist?
14
- Dry::CLI::Utils::Files.replace_first_line config.config_path, 'app/frontend', %( "sourceCodeDir": "app/javascript",)
13
+ if dir = %w[app/javascript app/packs].find { |path| root.join(path).exist? }
14
+ Dry::CLI::Utils::Files.replace_first_line config.config_path, 'app/frontend', %( "sourceCodeDir": "#{ dir }",)
15
15
  end
16
16
  setup_content_security_policy root.join('config/initializers/content_security_policy.rb')
17
17
  end
@@ -26,7 +26,7 @@ module ViteRails::TagHelpers
26
26
  crossorigin: 'anonymous',
27
27
  **options)
28
28
  entries = vite_manifest.resolve_entries(*names, type: asset_type)
29
- tags = javascript_include_tag(*entries.fetch(:scripts), crossorigin: crossorigin, type: type, **options)
29
+ tags = javascript_include_tag(*entries.fetch(:scripts), crossorigin: crossorigin, type: type, extname: false, **options)
30
30
  tags << vite_preload_tag(*entries.fetch(:imports), crossorigin: crossorigin) unless skip_preload_tags
31
31
  tags << stylesheet_link_tag(*entries.fetch(:stylesheets)) unless skip_style_tags
32
32
  tags
@@ -34,7 +34,7 @@ module ViteRails::TagHelpers
34
34
 
35
35
  # Public: Renders a <script> tag for the specified Vite entrypoints.
36
36
  def vite_typescript_tag(*names, **options)
37
- vite_javascript_tag(*names, asset_type: :typescript, extname: false, **options)
37
+ vite_javascript_tag(*names, asset_type: :typescript, **options)
38
38
  end
39
39
 
40
40
  # Public: Renders a <link> tag for the specified Vite entrypoints.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ViteRails
4
- VERSION = '2.0.3'
4
+ VERSION = '2.0.5'
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: 2.0.3
4
+ version: 2.0.5
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-03-07 00:00:00.000000000 Z
11
+ date: 2021-03-18 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.3/vite_rails
85
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@2.0.3/vite_rails/CHANGELOG.md
84
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails@2.0.5/vite_rails
85
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@2.0.5/vite_rails/CHANGELOG.md
86
86
  post_install_message:
87
87
  rdoc_options: []
88
88
  require_paths: