vite_rails_legacy 2.0.7 → 2.0.12
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07fbeaa8d89b057134c357fa4c3bf2c71ab9c1627b063a2c9be68d4c9af18ad0
|
4
|
+
data.tar.gz: 167c936e98597858301bdc893d4677192335291962da1c4429b658f6cf34225f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 396f657abc625640ea8c421ac5e500d8beea33fec57e92d13bf68bcbc7a42f9a2b8d420fa8c6c69556dbc00c30bc45306cdfdc263863f65e095d13c0d7969e61
|
7
|
+
data.tar.gz: f7ef43f193c72c8c42fbdfce54c0188b44e0ef3052d7f47c7d7da549411ec2beaa89351871a71eb77525ab8ea5b8936eb1e52a03250eed86ee21cd0507214c4a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,47 @@
|
|
1
|
+
## [2.0.12](https://github.com/ElMassimo/vite_ruby/compare/vite_rails_legacy@2.0.11...vite_rails_legacy@2.0.12) (2021-06-08)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* Support Ruby 2.4 ([#87](https://github.com/ElMassimo/vite_ruby/issues/87)) ([8fc4d49](https://github.com/ElMassimo/vite_ruby/commit/8fc4d49c82817623df81d6f9f94654ea726eb050))
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
## [2.0.11](https://github.com/ElMassimo/vite_ruby/compare/vite_rails_legacy@2.0.10...vite_rails_legacy@2.0.11) (2021-05-24)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* Fix typo in comment in example entrypoint in Rails ([78b3104](https://github.com/ElMassimo/vite_ruby/commit/78b3104bc687a79aebd4e0538b8b7c34562cb4eb))
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
## [2.0.10](https://github.com/ElMassimo/vite_ruby/compare/vite_rails_legacy@2.0.9...vite_rails_legacy@2.0.10) (2021-05-10)
|
20
|
+
|
21
|
+
|
22
|
+
### Refactor
|
23
|
+
|
24
|
+
* Avoid reference to `dry-cli` during installation, use internal APIs instead ([f5b87e](https://github.com/ElMassimo/vite_ruby/commit/f5b87e69790e48397d15e609b44118e399c9493d))
|
25
|
+
|
26
|
+
|
27
|
+
## [2.0.9](https://github.com/ElMassimo/vite_ruby/compare/vite_rails_legacy@2.0.8...vite_rails_legacy@2.0.9) (2021-04-21)
|
28
|
+
|
29
|
+
|
30
|
+
### Features
|
31
|
+
|
32
|
+
* Add helpers to enable HMR when using @vitejs/plugin-react-refresh ([a80f286](https://github.com/ElMassimo/vite_ruby/commit/a80f286d4305bbae29ea7cea42a4329a530f43fa))
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
## [2.0.8](https://github.com/ElMassimo/vite_ruby/compare/vite_rails_legacy@2.0.7...vite_rails_legacy@2.0.8) (2021-04-15)
|
37
|
+
|
38
|
+
|
39
|
+
### Bug Fixes
|
40
|
+
|
41
|
+
* Allow passing additional attributes to scripts and stylesheets. ([edf6019](https://github.com/ElMassimo/vite_ruby/commit/edf6019fa83646e413f36d289eac89bb2f8042a5))
|
42
|
+
|
43
|
+
|
44
|
+
|
1
45
|
## [2.0.7](https://github.com/ElMassimo/vite_ruby/compare/vite_rails_legacy@2.0.6...vite_rails_legacy@2.0.7) (2021-03-20)
|
2
46
|
|
3
47
|
|
@@ -11,7 +11,7 @@ module ViteRailsLegacy::Installation
|
|
11
11
|
def setup_app_files
|
12
12
|
cp RAILS_TEMPLATES.join('config/rails-vite.json'), config.config_path
|
13
13
|
if root.join('app/javascript').exist?
|
14
|
-
|
14
|
+
replace_first_line config.config_path, 'app/frontend', %( "sourceCodeDir": "app/javascript",)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -9,6 +9,11 @@ module ViteRailsLegacy::TagHelpers
|
|
9
9
|
"<script#{ tag_options({ src: src, type: 'module' }, escape: true) }></script>".html_safe
|
10
10
|
end
|
11
11
|
|
12
|
+
# Public: Renders a script tag to enable HMR with React Refresh.
|
13
|
+
def vite_react_refresh_tag
|
14
|
+
vite_manifest.react_refresh_preamble&.html_safe
|
15
|
+
end
|
16
|
+
|
12
17
|
# Public: Resolves the path for the specified Vite asset.
|
13
18
|
#
|
14
19
|
# Example:
|
@@ -24,11 +29,12 @@ module ViteRailsLegacy::TagHelpers
|
|
24
29
|
skip_preload_tags: false,
|
25
30
|
skip_style_tags: false,
|
26
31
|
crossorigin: 'anonymous',
|
32
|
+
media: 'screen',
|
27
33
|
**options)
|
28
34
|
entries = vite_manifest.resolve_entries(*names, type: asset_type)
|
29
35
|
tags = javascript_include_tag(*entries.fetch(:scripts), crossorigin: crossorigin, type: type, extname: false, **options)
|
30
|
-
tags << vite_preload_tag(*entries.fetch(:imports), crossorigin: crossorigin) unless skip_preload_tags
|
31
|
-
tags << stylesheet_link_tag(*entries.fetch(:stylesheets)) unless skip_style_tags
|
36
|
+
tags << vite_preload_tag(*entries.fetch(:imports), crossorigin: crossorigin, **options) unless skip_preload_tags
|
37
|
+
tags << stylesheet_link_tag(*entries.fetch(:stylesheets), media: media, crossorigin: crossorigin, **options) unless skip_style_tags
|
32
38
|
tags
|
33
39
|
end
|
34
40
|
|
@@ -51,11 +57,11 @@ private
|
|
51
57
|
end
|
52
58
|
|
53
59
|
# Internal: Renders a modulepreload link tag.
|
54
|
-
def vite_preload_tag(*sources, crossorigin
|
60
|
+
def vite_preload_tag(*sources, crossorigin:, **options)
|
55
61
|
sources.map { |source|
|
56
62
|
href = path_to_asset(source)
|
57
63
|
try(:request).try(:send_early_hints, 'Link' => %(<#{ href }>; rel=modulepreload; as=script; crossorigin=#{ crossorigin }))
|
58
|
-
tag('link', rel: 'modulepreload', href: href, as: 'script', crossorigin: crossorigin)
|
64
|
+
tag('link', rel: 'modulepreload', href: href, as: 'script', crossorigin: crossorigin, **options)
|
59
65
|
}.join("\n").html_safe
|
60
66
|
end
|
61
67
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
console.log('Vite ⚡️ Rails')
|
7
7
|
|
8
8
|
// If using a TypeScript entrypoint file:
|
9
|
-
// <%= vite_typescript_tag 'application
|
9
|
+
// <%= vite_typescript_tag 'application' %>
|
10
10
|
//
|
11
11
|
// If you want to use .jsx or .tsx, add the extension:
|
12
12
|
// <%= vite_javascript_tag 'application.jsx' %>
|
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: 2.0.
|
4
|
+
version: 2.0.12
|
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-
|
11
|
+
date: 2021-06-08 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@2.0.
|
65
|
-
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails_legacy@2.0.
|
64
|
+
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails_legacy@2.0.12/vite_rails_legacy
|
65
|
+
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails_legacy@2.0.12/vite_rails_legacy/CHANGELOG.md
|
66
66
|
post_install_message:
|
67
67
|
rdoc_options: []
|
68
68
|
require_paths:
|
@@ -71,7 +71,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
71
71
|
requirements:
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '2.
|
74
|
+
version: '2.4'
|
75
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
77
|
- - ">="
|