vite_ruby 3.5.0 → 3.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/lib/tasks/vite.rake +8 -2
- data/lib/vite_ruby/cli/install.rb +14 -1
- data/lib/vite_ruby/config.rb +2 -0
- data/lib/vite_ruby/manifest.rb +2 -0
- data/lib/vite_ruby/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: c43c5405ffc154281d526ae4c1f2b99c4b1c81c2161477573d9b08534fcef2e5
|
4
|
+
data.tar.gz: 9ea913409fd700fee2c2d666fa208af2886a62a1b3ad81aa186bee9e02e33024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d012ee60dd480fd9f6ed6f7fb53a539112f891ac582fbaf26c6b7baa38151fa4e647cbd6bf7f4173d4dffa43d9a41360ea7ff9d7ebe550a95375dc35cc75c996
|
7
|
+
data.tar.gz: 907d01e3458f7dc82b832815b700a94c13e4e79144a4b5ebd0466a7d074d98edbb6148614ba0545c1750d81e6c3ef89ba00ee7904c8c09def8cc2686330dccdc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
## [3.6.1](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.6.0...vite_ruby@3.6.1) (2024-07-16)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* use ESM by default in new installations ([#479](https://github.com/ElMassimo/vite_ruby/issues/479)) ([cc379ca](https://github.com/ElMassimo/vite_ruby/commit/cc379ca613dd4e5863f8556be62ea623b56cfe0c)), closes [#431](https://github.com/ElMassimo/vite_ruby/issues/431)
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
# [3.6.0](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.5.0...vite_ruby@3.6.0) (2024-06-07)
|
11
|
+
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
* allow skipping dependency install in assets:precompile ([#451](https://github.com/ElMassimo/vite_ruby/issues/451)) ([5a922b2](https://github.com/ElMassimo/vite_ruby/commit/5a922b2071446e3880b17503474a0c7806eab6a7))
|
16
|
+
|
17
|
+
|
18
|
+
|
1
19
|
# [3.5.0](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.4.0...vite_ruby@3.5.0) (2023-11-16)
|
2
20
|
|
3
21
|
|
data/lib/tasks/vite.rake
CHANGED
@@ -59,12 +59,18 @@ unless ENV['VITE_RUBY_SKIP_ASSETS_PRECOMPILE_EXTENSION'] == 'true'
|
|
59
59
|
if Rake::Task.task_defined?('assets:precompile')
|
60
60
|
Rake::Task['assets:precompile'].enhance do |task|
|
61
61
|
prefix = task.name.split(/#|assets:precompile/).first
|
62
|
-
|
62
|
+
unless ENV['VITE_RUBY_SKIP_ASSETS_PRECOMPILE_INSTALL'] == 'true'
|
63
|
+
Rake::Task["#{ prefix }vite:install_dependencies"].invoke
|
64
|
+
end
|
63
65
|
Rake::Task["#{ prefix }vite:build_all"].invoke
|
64
66
|
end
|
65
67
|
else
|
66
68
|
desc 'Bundle Vite assets'
|
67
|
-
|
69
|
+
if ENV['VITE_RUBY_SKIP_ASSETS_PRECOMPILE_INSTALL'] == 'true'
|
70
|
+
Rake::Task.define_task('assets:precompile' => 'vite:build_all')
|
71
|
+
else
|
72
|
+
Rake::Task.define_task('assets:precompile' => ['vite:install_dependencies', 'vite:build_all'])
|
73
|
+
end
|
68
74
|
end
|
69
75
|
|
70
76
|
unless Rake::Task.task_defined?('assets:clean')
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'stringio'
|
4
|
+
require 'json'
|
4
5
|
|
5
6
|
class ViteRuby::CLI::Install < Dry::CLI::Command
|
6
7
|
desc 'Performs the initial configuration setup to get started with Vite Ruby.'
|
@@ -79,7 +80,19 @@ private
|
|
79
80
|
# Internal: Installs vite and vite-plugin-ruby at the project level.
|
80
81
|
def install_js_dependencies
|
81
82
|
package_json = root.join('package.json')
|
82
|
-
|
83
|
+
unless package_json.exist?
|
84
|
+
write(package.json, <<~JSON)
|
85
|
+
{
|
86
|
+
"private": true,
|
87
|
+
"type": "module"
|
88
|
+
}
|
89
|
+
JSON
|
90
|
+
end
|
91
|
+
|
92
|
+
if (JSON.parse(package_json.read)['type'] != 'module' rescue nil)
|
93
|
+
FileUtils.mv root.join('vite.config.ts'), root.join('vite.config.mts'), force: true, verbose: true
|
94
|
+
end
|
95
|
+
|
83
96
|
deps = js_dependencies.join(' ')
|
84
97
|
run_with_capture("#{ npm_install } -D #{ deps }", stdin_data: "\n")
|
85
98
|
end
|
data/lib/vite_ruby/config.rb
CHANGED
data/lib/vite_ruby/manifest.rb
CHANGED
data/lib/vite_ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vite_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Máximo Mussini
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-cli
|
@@ -208,8 +208,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
|
|
208
208
|
licenses:
|
209
209
|
- MIT
|
210
210
|
metadata:
|
211
|
-
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.
|
212
|
-
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.
|
211
|
+
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.6.1/vite_ruby
|
212
|
+
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.6.1/vite_ruby/CHANGELOG.md
|
213
213
|
post_install_message: "Thanks for installing Vite Ruby!\n\nIf you upgraded the gem
|
214
214
|
manually, please run:\n\tbundle exec vite upgrade"
|
215
215
|
rdoc_options: []
|