vite_plugin_legacy 0.5.0 → 0.5.5

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: ad345c925498e8538f59aa3868f0f406fc47883e490e4878126a810789696a0f
4
- data.tar.gz: 9761f17774c82641a7d457425965d3d49708b18e493a1041dd1211fa0ff79a09
3
+ metadata.gz: e6999d44214b380bafb3bac056067740e15fc6fdda110d2e252f515d3d40f5b7
4
+ data.tar.gz: 593cdd9c5c7a649bbeec8a0a1a27a0e0f5422fab0fd1264c814a3917a5b63fcd
5
5
  SHA512:
6
- metadata.gz: 6b9c7fceac3b94cba30107f5c7fd8dc3be280c3a4b2239659d0b17e35b2097b876a9a7d97a492379190c35ee899bd4b3ca73918256732c5d8f29b19b080d91da
7
- data.tar.gz: c007c55df8183531e85fe92b126088b03d64478550284279fd25ca45a28959d49dd5e49ca28d3b1ddb8c3d883755d6bead72e0db03a0c470751d439de265a595
6
+ metadata.gz: 741c3fae1dd20d881218c814e3c093069ee8c3172e63206bc7670ee74fa0555502e84e9c113fe387bb57c64a965d916895978a2b48c743758bf3e3795e5a3d0e
7
+ data.tar.gz: f37953c54a4a7a2a46a9efb7bcf9c17115e789604929f0ae8b9acdbb4eb0e2c74d6881e7edcf6c960e6189053e577df62882e5bc5c69ce31a46b1b95a5a6642a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,43 @@
1
+ ## [0.5.5](https://github.com/ElMassimo/vite_ruby/compare/vite_plugin_legacy@0.5.4...vite_plugin_legacy@0.5.5) (2021-03-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Passing a file with extension to vite_legacy_javascript_tag ([c54f3b3](https://github.com/ElMassimo/vite_ruby/commit/c54f3b3372e8e5c0f800c5f68bffbb6d0b7990c4))
7
+
8
+
9
+
10
+ ## [0.5.4](https://github.com/ElMassimo/vite_ruby/compare/vite_plugin_legacy@0.5.3...vite_plugin_legacy@0.5.4) (2021-03-08)
11
+
12
+
13
+ ### Features
14
+
15
+ * Add `vite_legacy_typescript_tag` tag helper. ([3fb6a8b](https://github.com/ElMassimo/vite_ruby/commit/3fb6a8bcccc14c6596ecd2b30134d7001fd3bf50))
16
+
17
+
18
+
19
+ ## [0.5.3](https://github.com/ElMassimo/vite_ruby/compare/vite_plugin_legacy@0.5.2...vite_plugin_legacy@0.5.3) (2021-03-07)
20
+
21
+ - Add a bounded requirement to `vite_ruby` dependency.
22
+
23
+ ## [0.5.2](https://github.com/ElMassimo/vite_ruby/compare/vite_plugin_legacy@0.5.1...vite_plugin_legacy@0.5.2) (2021-03-05)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * Don't require `vite_rails` to enable usage with any framework. ([b7461e1](https://github.com/ElMassimo/vite_ruby/commit/b7461e14aefbbb736e282a615874accc24d69bcf))
29
+
30
+
31
+
32
+ ## [0.5.1](https://github.com/ElMassimo/vite_ruby/compare/vite_plugin_legacy@0.5.0...vite_plugin_legacy@0.5.1) (2021-03-05)
33
+
34
+
35
+ ### Bug Fixes
36
+
37
+ * Testing leftovers accidentally disabled nomodules ([39f66f4](https://github.com/ElMassimo/vite_ruby/commit/39f66f413237cb1fe063f767f645c1c1be43653c))
38
+
39
+
40
+
1
41
  # 0.5.0 (2021-03-05)
2
42
 
3
43
 
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'vite_rails'
4
3
  require 'rails/railtie'
5
4
 
6
5
  class VitePluginLegacy::Engine < Rails::Engine
@@ -7,15 +7,20 @@ module VitePluginLegacy::TagHelpers
7
7
  def vite_legacy_javascript_tag(name, asset_type: :javascript)
8
8
  return if ViteRuby.instance.dev_server_running?
9
9
 
10
- legacy_name = name.sub(/\.|$/, '-legacy\1')
10
+ legacy_name = name.sub(/(\..+)|$/, '-legacy\1')
11
11
  id = "vite-#{ legacy_name.tr(' .\'', '-') }-entry"
12
- import_tag = content_tag(:script, nomodule: false, id: id, 'data-src': vite_asset_path(legacy_name, type: asset_type)) {
12
+ import_tag = content_tag(:script, nomodule: true, id: id, 'data-src': vite_asset_path(legacy_name, type: asset_type)) {
13
13
  "System.import(document.getElementById('#{ id }').getAttribute('data-src'))".html_safe
14
14
  }
15
15
 
16
16
  safe_join [vite_legacy_polyfill_tag, import_tag]
17
17
  end
18
18
 
19
+ # Public: Same as `vite_legacy_javascript_tag`, but for TypeScript entries.
20
+ def vite_legacy_typescript_tag(name)
21
+ vite_legacy_javascript_tag(name, asset_type: :typescript)
22
+ end
23
+
19
24
  # Internal: Renders the vite-legacy-polyfill to enable code splitting in
20
25
  # browsers that do not support modules.
21
26
  def vite_legacy_polyfill_tag
@@ -23,6 +28,6 @@ module VitePluginLegacy::TagHelpers
23
28
 
24
29
  name = vite_manifest.send(:manifest).keys.find { |file| file.include?('legacy-polyfills') } ||
25
30
  raise(ArgumentError, 'Vite legacy polyfill not found in manifest.json')
26
- content_tag(:script, nil, nomodule: false, src: vite_asset_path(name))
31
+ content_tag(:script, nil, nomodule: true, src: vite_asset_path(name))
27
32
  end
28
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VitePluginLegacy
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.5'
5
5
  end
metadata CHANGED
@@ -1,85 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vite_plugin_legacy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.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-05 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: vite_ruby
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.3.0
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 1.3.0
41
- - !ruby/object:Gem::Dependency
42
- name: rubocop
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop-minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop-performance
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
26
+ version: '1.0'
83
27
  description:
84
28
  email:
85
29
  - maximomussini@gmail.com
@@ -98,8 +42,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
98
42
  licenses:
99
43
  - MIT
100
44
  metadata:
101
- source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_plugin_legacy@0.5.0/vite_plugin_legacy
102
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_plugin_legacy@0.5.0/vite_plugin_legacy/CHANGELOG.md
45
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_plugin_legacy@0.5.5/vite_plugin_legacy
46
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_plugin_legacy@0.5.5/vite_plugin_legacy/CHANGELOG.md
103
47
  post_install_message:
104
48
  rdoc_options: []
105
49
  require_paths: