vite_ruby 1.0.5 → 1.1.0

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: edbaa4a25307c203d7d4e5fafa8605f5fffe05eecd078432d9db5e0e065a3105
4
- data.tar.gz: 71ccf0533e961a9344cdfb321dad6f53391a65b46bb7a6a3ca88d2403842fd2f
3
+ metadata.gz: 436737196c45af00694c405d697cea826566bec8ab5e0ef246f5917b253df3cf
4
+ data.tar.gz: c052a43c6faa9c07318658f870a50db7aabdf7beb7074e80dc9026272125becc
5
5
  SHA512:
6
- metadata.gz: '09c608d897769b244a674eaf52623fd2fb62a9ff12677bfc2c10ea9685e5985a8e4a45f9f0751d257e3d162fee522ab1d2c0677aec230e7178d9ec9b1a50002b'
7
- data.tar.gz: f5a2f1dd5a74109a4bc1d0bcfa0e5b7fff6a2abe1538cb33c9db90c99ebfe84814af80a51f4e5426cda933934de4d517c78d699260120c25036cef32794dece8
6
+ metadata.gz: b164085097cd79feabc3dffec84129b042a92ede8a37de7aaa04adb1a679be37af609d4eba1f105cb5a924cb173e425c850795f346a2648de7b4dd80b3e9f1d1
7
+ data.tar.gz: 67bb02e9619228ac48361fac841c46d032f1f0094ea6fc57cfe8dd68431f1fb4a1101de7dea04b911b40057acbf1484eda11046a2dce85c5699a1643b6c129ef
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ # [1.1.0](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@1.0.5...vite_ruby@1.1.0) (2021-03-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Add development mutex in manifest to prevent re-entrant builds ([a6c6976](https://github.com/ElMassimo/vite_ruby/commit/a6c6976ba3821d8d6f26d012de13a440cb91c95b))
7
+ * Allow passing --inspect and other options to the build command ([1818ea4](https://github.com/ElMassimo/vite_ruby/commit/1818ea4f1d211923dfe0c04037baca8b2fd3b991))
8
+
9
+
10
+ ### Features
11
+
12
+ * Record status and timestamp of each build to provide better errors ([a35a64a](https://github.com/ElMassimo/vite_ruby/commit/a35a64ad4ca802da7bb6d5f5139985da864293a4))
13
+ * Stream build output to provide feedback as the command runs ([2bce338](https://github.com/ElMassimo/vite_ruby/commit/2bce33888513f6961da11ddfa9f9c703182abfa6))
14
+
15
+
16
+
1
17
  ## [1.0.5](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@1.0.4...vite_ruby@1.0.5) (2021-03-03)
2
18
 
3
19
 
data/README.md CHANGED
@@ -70,6 +70,8 @@ Please use [Issues] to report bugs you find, and [Discussions] to make feature r
70
70
 
71
71
  Don't hesitate to _⭐️ star the project_ if you find it useful!
72
72
 
73
+ Using it in production? Always love to hear about it! 😃
74
+
73
75
 
74
76
  ## Special Thanks 🙏
75
77
 
data/lib/vite_ruby.rb CHANGED
@@ -28,7 +28,6 @@ class ViteRuby
28
28
 
29
29
  def_delegators :instance, :config, :commands, :run_proxy?
30
30
  def_delegators :config, :mode
31
- def_delegators 'ViteRuby::Runner.new', :run
32
31
 
33
32
  def instance
34
33
  @instance ||= ViteRuby.new
@@ -52,6 +51,11 @@ class ViteRuby
52
51
  load File.expand_path('tasks/vite.rake', __dir__)
53
52
  end
54
53
 
54
+ # Internal: Executes the vite binary.
55
+ def run(argv, **options)
56
+ ViteRuby::Runner.new(instance).run(argv, **options)
57
+ end
58
+
55
59
  # Internal: Refreshes the config after setting the env vars.
56
60
  def reload_with(env_vars)
57
61
  env.update(env_vars)
@@ -75,9 +79,6 @@ class ViteRuby
75
79
  end
76
80
  end
77
81
 
78
- extend Forwardable
79
- def_delegators :builder, :build
80
-
81
82
  attr_writer :logger
82
83
 
83
84
  def logger
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Internal: Value object with information about the last build.
4
+ ViteRuby::Build = Struct.new(:success, :timestamp, :digest, :current_digest) do
5
+ # Internal: Combines information from a previous build with the current digest.
6
+ def self.from_previous(attrs, current_digest)
7
+ new(attrs['success'], attrs['timestamp'] || 'never', attrs['digest'] || 'none', current_digest)
8
+ end
9
+
10
+ # Internal: Returns true if watched files have changed since the last build.
11
+ def stale?
12
+ digest != current_digest
13
+ end
14
+
15
+ # Internal: Returns true if watched files have not changed since the last build.
16
+ def fresh?
17
+ !stale?
18
+ end
19
+
20
+ # Internal: Returns a new build with the specified result.
21
+ def with_result(success)
22
+ self.class.new(success, Time.now.strftime('%F %T'), current_digest)
23
+ end
24
+
25
+ # Internal: Returns a JSON string with the metadata of the build.
26
+ def to_json(*_args)
27
+ JSON.pretty_generate(to_h)
28
+ end
29
+ end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'json'
3
4
  require 'digest/sha1'
4
5
 
5
6
  # Public: Keeps track of watched files and triggers builds as needed.
@@ -10,23 +11,22 @@ class ViteRuby::Builder
10
11
 
11
12
  # Public: Checks if the watched files have changed since the last compilation,
12
13
  # and triggers a Vite build if any files have changed.
13
- def build
14
- if stale?
15
- build_with_vite.tap { record_files_digest }
16
- else
17
- logger.debug 'Skipping build. Vite assets are already up-to-date ⚡️'
14
+ def build(*args)
15
+ last_build = last_build_metadata
16
+ if args.delete('--force') || last_build.stale?
17
+ build_with_vite(*args).tap { |success| record_build_metadata(success, last_build) }
18
+ elsif last_build.success
19
+ logger.debug "Skipping vite build. Watched files have not changed since the last build at #{ last_build.timestamp }"
18
20
  true
21
+ else
22
+ logger.error "Skipping vite build. Watched files have not changed since the build failed at #{ last_build.timestamp } ❌"
23
+ false
19
24
  end
20
25
  end
21
26
 
22
- # Public: Returns true if all the assets built by Vite are up to date.
23
- def fresh?
24
- previous_files_digest&.== watched_files_digest
25
- end
26
-
27
- # Public: Returns true if any of the assets built by Vite is out of date.
28
- def stale?
29
- !fresh?
27
+ # Internal: Reads the result of the last compilation from disk.
28
+ def last_build_metadata
29
+ ViteRuby::Build.from_previous(last_build_attrs, watched_files_digest)
30
30
  end
31
31
 
32
32
  private
@@ -35,21 +35,22 @@ private
35
35
 
36
36
  def_delegators :@vite_ruby, :config, :logger
37
37
 
38
- # Internal: Writes a digest of the watched files to disk for future checks.
39
- def record_files_digest
40
- config.build_cache_dir.mkpath
41
- files_digest_path.write(watched_files_digest)
38
+ # Internal: Reads metadata recorded on the last build, if it exists.
39
+ def last_build_attrs
40
+ last_build_path.exist? ? JSON.parse(last_build_path.read.to_s) : {}
41
+ rescue JSON::JSONError, Errno::ENOENT, Errno::ENOTDIR
42
+ {}
42
43
  end
43
44
 
44
- # Internal: The path of where a digest of the watched files is stored.
45
- def files_digest_path
46
- config.build_cache_dir.join("last-compilation-digest-#{ config.mode }")
45
+ # Internal: Writes a digest of the watched files to disk for future checks.
46
+ def record_build_metadata(success, build)
47
+ config.build_cache_dir.mkpath
48
+ last_build_path.write build.with_result(success).to_json
47
49
  end
48
50
 
49
- # Internal: Reads a digest of watched files from disk.
50
- def previous_files_digest
51
- files_digest_path.read if files_digest_path.exist? && config.manifest_path.exist?
52
- rescue Errno::ENOENT, Errno::ENOTDIR
51
+ # Internal: The file path where metadata of the last build is stored.
52
+ def last_build_path
53
+ config.build_cache_dir.join("last-build-#{ config.mode }.json")
53
54
  end
54
55
 
55
56
  # Internal: Returns a digest of all the watched files, allowing to detect
@@ -65,11 +66,11 @@ private
65
66
  # Public: Initiates a Vite build command to generate assets.
66
67
  #
67
68
  # Returns true if the build is successful, or false if it failed.
68
- def build_with_vite
69
+ def build_with_vite(*args)
69
70
  logger.info 'Building with Vite ⚡️'
70
71
 
71
- stdout, stderr, status = ViteRuby.run(['build'], capture: true)
72
- log_build_result(stdout, stderr, status)
72
+ stdout, stderr, status = ViteRuby.run(['build', *args], capture: true)
73
+ log_build_result(stdout, stderr.to_s, status)
73
74
 
74
75
  status.success?
75
76
  end
@@ -77,16 +78,14 @@ private
77
78
  # Internal: Outputs the build results.
78
79
  #
79
80
  # NOTE: By default it also outputs the manifest entries.
80
- def log_build_result(stdout, stderr, status)
81
+ def log_build_result(_stdout, stderr, status)
81
82
  if status.success?
82
83
  logger.info "Build with Vite complete: #{ config.build_output_dir }"
83
- logger.error(stderr.to_s) unless stderr.empty?
84
- logger.info(stdout) unless config.hide_build_console_output
84
+ logger.error stderr.to_s unless stderr.empty?
85
85
  else
86
- non_empty_streams = [stdout, stderr].delete_if(&:empty?)
87
- errors = non_empty_streams.join("\n\n")
88
- errors += "\n❌ Check that vite and vite-plugin-ruby are in devDependencies and have been installed. " if errors.include?('ERR! canceled')
89
- logger.error "Build with Vite failed:\n#{ errors }"
86
+ logger.error stderr
87
+ logger.error 'Build with Vite failed! ❌'
88
+ logger.error '❌ Check that vite and vite-plugin-ruby are in devDependencies and have been installed. ' if stderr.include?('ERR! canceled')
90
89
  end
91
90
  end
92
91
 
@@ -98,7 +97,11 @@ private
98
97
  *config.watch_additional_paths,
99
98
  "#{ config.source_code_dir }/**/*",
100
99
  'yarn.lock',
100
+ 'package-lock.json',
101
+ 'pnpm-lock.yaml',
101
102
  'package.json',
103
+ 'vite.config.ts',
104
+ 'vite.config.js',
102
105
  config.config_path,
103
106
  ].freeze
104
107
  end
@@ -6,13 +6,18 @@ class ViteRuby::CLI::Build < Dry::CLI::Command
6
6
 
7
7
  def self.shared_options
8
8
  option(:mode, default: self::DEFAULT_ENV, values: %w[development production], aliases: ['m'], desc: 'The build mode for Vite')
9
+ option(:debug, desc: 'Run Vite in verbose mode, printing all debugging output', aliases: ['verbose'], type: :boolean)
10
+ option(:inspect, desc: 'Run Vite in a debugging session with node --inspect-brk', aliases: ['inspect-brk'], type: :boolean)
11
+ option(:trace_deprecation, desc: 'Run Vite in debugging mode with node --trace-deprecation', aliases: ['trace-deprecation'], type: :boolean)
9
12
  end
10
13
 
11
14
  desc 'Bundle all entrypoints using Vite.'
12
15
  shared_options
16
+ option(:force, desc: 'Force the build even if assets have not changed', type: :boolean)
13
17
 
14
- def call(mode:)
18
+ def call(mode:, args: [], **boolean_opts)
15
19
  ViteRuby.env['VITE_RUBY_MODE'] = mode
16
- block_given? ? yield(mode) : ViteRuby.commands.build_from_task
20
+ boolean_opts.map { |name, value| args << "--#{ name }" if value }
21
+ block_given? ? yield(args) : ViteRuby.commands.build_from_task(*args)
17
22
  end
18
23
  end
@@ -5,8 +5,9 @@ class ViteRuby::CLI::Dev < ViteRuby::CLI::Build
5
5
 
6
6
  desc 'Start the Vite development server.'
7
7
  shared_options
8
+ option(:force, desc: 'Force Vite to re-bundle dependencies', type: :boolean)
8
9
 
9
- def call(mode:, args: [])
10
- super(mode: mode) { ViteRuby.run(args) }
10
+ def call(**options)
11
+ super { |args| ViteRuby.run(args) }
11
12
  end
12
13
  end
@@ -8,17 +8,17 @@ class ViteRuby::Commands
8
8
  end
9
9
 
10
10
  # Public: Defaults to production, and exits if the build fails.
11
- def build_from_task
11
+ def build_from_task(*args)
12
12
  with_node_env(ENV.fetch('NODE_ENV', 'production')) {
13
13
  ensure_log_goes_to_stdout {
14
- build || exit!
14
+ build(*args) || exit!
15
15
  }
16
16
  }
17
17
  end
18
18
 
19
19
  # Public: Builds all assets that are managed by Vite, from the entrypoints.
20
- def build
21
- builder.build.tap { manifest.refresh }
20
+ def build(*args)
21
+ builder.build(*args).tap { manifest.refresh }
22
22
  end
23
23
 
24
24
  # Public: Removes all build cache and previously compiled assets.
@@ -149,10 +149,12 @@ private
149
149
  end
150
150
 
151
151
  def ensure_log_goes_to_stdout
152
- old_logger = logger
153
- self.logger = Logger.new($stdout)
152
+ old_logger, original_sync = logger, $stdout.sync
153
+
154
+ $stdout.sync = true
155
+ self.logger = Logger.new($stdout, formatter: proc { |_, _, progname, msg| progname == 'vite' ? msg : "#{ msg }\n" })
154
156
  yield
155
157
  ensure
156
- self.logger = old_logger
158
+ self.logger, $stdout.sync = old_logger, original_sync
157
159
  end
158
160
  end
@@ -9,7 +9,7 @@ class ViteRuby::DevServerProxy < Rack::Proxy
9
9
 
10
10
  def initialize(app = nil, options = {})
11
11
  @vite_ruby = options.delete(:vite_ruby) || ViteRuby.instance
12
- options[:streaming] = false if ViteRuby.mode == 'test' && !options.key?(:streaming)
12
+ options[:streaming] = false if config.mode == 'test' && !options.key?(:streaming)
13
13
  super
14
14
  end
15
15
 
@@ -15,6 +15,7 @@ class ViteRuby::Manifest
15
15
 
16
16
  def initialize(vite_ruby)
17
17
  @vite_ruby = vite_ruby
18
+ @build_mutex = Mutex.new if config.auto_build
18
19
  end
19
20
 
20
21
  # Public: Returns the path for the specified Vite entrypoint file.
@@ -65,7 +66,7 @@ protected
65
66
  # manifest.lookup('calendar.js')
66
67
  # => { "file" => "/vite/assets/calendar-1016838bab065ae1e122.js", "imports" => [] }
67
68
  def lookup(name, type: nil)
68
- build if should_build?
69
+ @build_mutex.synchronize { builder.build } if should_build?
69
70
 
70
71
  find_manifest_entry(with_file_extension(name, type))
71
72
  end
@@ -74,7 +75,7 @@ private
74
75
 
75
76
  extend Forwardable
76
77
 
77
- def_delegators :@vite_ruby, :config, :build, :dev_server_running?
78
+ def_delegators :@vite_ruby, :config, :builder, :dev_server_running?
78
79
 
79
80
  # NOTE: Auto compilation is convenient when running tests, when the developer
80
81
  # won't focus on the frontend, or when running the Vite server is not desired.
@@ -142,27 +143,38 @@ private
142
143
  # Internal: Raises a detailed message when an entry is missing in the manifest.
143
144
  def missing_entry_error(name, type: nil, **_options)
144
145
  file_name = with_file_extension(name, type)
146
+ last_build = builder.last_build_metadata
145
147
  raise ViteRuby::Manifest::MissingEntryError, <<~MSG
146
- Vite Ruby can't find #{ file_name } in #{ config.manifest_path } or #{ config.assets_manifest_path }.
148
+ Vite Ruby can't find #{ file_name } in #{ config.manifest_path.relative_path_from(config.root) } or #{ config.assets_manifest_path.relative_path_from(config.root) }.
147
149
 
148
150
  Possible causes:
149
- #{ missing_entry_causes.map { |cause| "\t- #{ cause }" }.join("\n") }
150
-
151
- Content in your manifests:
152
- #{ JSON.pretty_generate(@manifest) }
151
+ #{ possible_causes(last_build) }
152
+ Visit the Troubleshooting guide for more information:
153
+ https://vite-ruby.netlify.app/guide/troubleshooting.html#troubleshooting
154
+ #{ "\nContent in your manifests:\n#{ JSON.pretty_generate(@manifest) }\n" if last_build.success }
155
+ #{ "\nLast build in #{ config.mode } mode:\n#{ last_build.to_json }\n" unless last_build.success.nil? }
153
156
  MSG
154
157
  end
155
158
 
156
- def missing_entry_causes
157
- local = config.auto_build
158
- [
159
- (dev_server_running? && 'Vite has not yet re-built your latest changes.'),
160
- (local && !dev_server_running? && "\"autoBuild\": false in your #{ config.mode } configuration."),
161
- (local && !dev_server_running? && 'The Vite development server has crashed or is no longer available.'),
162
- 'You have misconfigured config/vite.json file.',
163
- (!local && 'Assets have not been precompiled'),
164
- ].select(&:itself)
165
- rescue StandardError
166
- []
159
+ def possible_causes(last_build)
160
+ return FAILED_BUILD_CAUSES if last_build.success == false
161
+ return DEFAULT_CAUSES if config.auto_build
162
+
163
+ DEFAULT_CAUSES + NO_AUTO_BUILD_CAUSES
167
164
  end
165
+
166
+ FAILED_BUILD_CAUSES = <<-MSG
167
+ - The last build failed. Try running `bin/vite build --force` manually and check for errors.
168
+ MSG
169
+
170
+ DEFAULT_CAUSES = <<-MSG
171
+ - The file path is incorrect.
172
+ - The file is not in the entrypoints directory.
173
+ - Some files are outside the sourceCodeDir, and have not been added to watchAdditionalPaths.
174
+ MSG
175
+
176
+ NO_AUTO_BUILD_CAUSES = <<-MSG
177
+ - You have not run `bin/vite dev` to start Vite, or the dev server is not reachable.
178
+ - "autoBuild" is set to `false` in your config/vite.json for this environment.
179
+ MSG
168
180
  end
@@ -4,54 +4,61 @@ require 'open3'
4
4
 
5
5
  # Public: Executes Vite commands, providing conveniences for debugging.
6
6
  class ViteRuby::Runner
7
- # Public: Executes Vite with the specified arguments.
8
- def run(argv, **options)
9
- $stdout.sync = true
10
- detect_unsupported_switches!(argv)
11
- execute_command(argv.clone, **options)
12
- end
13
-
14
- private
15
-
16
- UNSUPPORTED_SWITCHES = %w[--host --port --https --root -r --config -c].freeze
17
-
18
- # Internal: Allows to prevent configuration mistakes by ensuring the Ruby app
19
- # and vite-plugin-ruby are using the same configuration for the dev server.
20
- def detect_unsupported_switches!(args)
21
- return unless (unsupported = UNSUPPORTED_SWITCHES & args).any?
22
-
23
- $stdout.puts "Please set the following switches in your vite.json instead: #{ unsupported }."
24
- exit!
7
+ def initialize(vite_ruby)
8
+ @vite_ruby = vite_ruby
25
9
  end
26
10
 
27
- # Internal: Executes the command with the specified arguments.
28
- def execute_command(args, capture: false)
11
+ # Public: Executes Vite with the specified arguments.
12
+ def run(argv, capture: false)
29
13
  if capture
30
- Open3.capture3(*command_for(args), chdir: ViteRuby.config.root)
14
+ capture3_with_output(*command_for(argv), chdir: config.root)
31
15
  else
32
- Dir.chdir(ViteRuby.config.root) { Kernel.exec(*command_for(args)) }
16
+ Dir.chdir(config.root) { Kernel.exec(*command_for(argv)) }
33
17
  end
34
18
  end
35
19
 
20
+ private
21
+
22
+ extend Forwardable
23
+
24
+ def_delegators :@vite_ruby, :config, :logger
25
+
36
26
  # Internal: Returns an Array with the command to run.
37
27
  def command_for(args)
38
- [vite_env].tap do |cmd|
39
- cmd.append('node', '--inspect-brk') if args.include?('--debug')
40
- cmd.append('node', '--trace-deprecation') if args.delete('--trace-deprecation')
28
+ [config.to_env].tap do |cmd|
29
+ args = args.clone
30
+ cmd.append('node', '--inspect-brk') if args.delete('--inspect')
31
+ cmd.append('node', '--trace-deprecation') if args.delete('--trace_deprecation')
41
32
  cmd.append(*vite_executable(cmd))
42
33
  cmd.append(*args)
43
- cmd.append('--mode', ViteRuby.mode) unless args.include?('--mode') || args.include?('-m')
34
+ cmd.append('--mode', config.mode) unless args.include?('--mode') || args.include?('-m')
44
35
  end
45
36
  end
46
37
 
47
- # Internal: The environment variables to pass to the command.
48
- def vite_env
49
- ViteRuby.config.to_env
50
- end
51
-
52
38
  # Internal: Resolves to an executable for Vite.
53
39
  def vite_executable(cmd)
54
- npx = cmd.include?('node') ? `which npx`.chomp("\n") : 'npx' rescue 'npx'
55
- [npx, '--no-install', '--', 'vite']
40
+ cmd.include?('node') ? ['./node_modules/.bin/vite'] : ['npx', '--no-install', '--', 'vite']
41
+ end
42
+
43
+ # Internal: A modified version of capture3 that continuosly prints stdout.
44
+ # NOTE: This improves the experience of running bin/vite build.
45
+ def capture3_with_output(*cmd, **opts)
46
+ return Open3.capture3(*cmd, opts) if config.hide_build_console_output
47
+
48
+ Open3.popen3(*cmd, opts) { |_stdin, stdout, stderr, wait_threads|
49
+ out = Thread.new { read_lines(stdout) { |l| logger.info('vite') { l } } }
50
+ err = Thread.new { stderr.read }
51
+ [out.value, err.value, wait_threads.value]
52
+ }
53
+ end
54
+
55
+ # Internal: Reads and yield every line in the stream. Returns the full content.
56
+ def read_lines(io)
57
+ buffer = +''
58
+ while line = io.gets
59
+ buffer << line
60
+ yield line
61
+ end
62
+ buffer
56
63
  end
57
64
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ViteRuby
4
- VERSION = '1.0.5'
4
+ VERSION = '1.1.0'
5
5
  end
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: 1.0.5
4
+ version: 1.1.0
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: 2021-03-03 00:00:00.000000000 Z
11
+ date: 2021-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -28,6 +28,9 @@ dependencies:
28
28
  name: rack-proxy
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.6'
31
34
  - - ">="
32
35
  - !ruby/object:Gem::Version
33
36
  version: 0.6.1
@@ -35,6 +38,9 @@ dependencies:
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '0.6'
38
44
  - - ">="
39
45
  - !ruby/object:Gem::Version
40
46
  version: 0.6.1
@@ -42,58 +48,156 @@ dependencies:
42
48
  name: zeitwerk
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - ">="
51
+ - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '0'
53
+ version: '2.2'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - ">="
58
+ - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '0'
60
+ version: '2.2'
55
61
  - !ruby/object:Gem::Dependency
56
- name: bundler
62
+ name: m
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
- - - ">="
65
+ - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: 1.3.0
67
+ version: '1.5'
62
68
  type: :development
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
- - - ">="
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '1.5'
75
+ - !ruby/object:Gem::Dependency
76
+ name: minitest
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '5.0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
67
87
  - !ruby/object:Gem::Version
68
- version: 1.3.0
88
+ version: '5.0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: minitest-reporters
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.4'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '1.4'
103
+ - !ruby/object:Gem::Dependency
104
+ name: minitest-stub_any_instance
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '1.0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: pry-byebug
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '3.9'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: '3.9'
131
+ - !ruby/object:Gem::Dependency
132
+ name: rake
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '13.0'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '13.0'
69
145
  - !ruby/object:Gem::Dependency
70
146
  name: rubocop
71
147
  requirement: !ruby/object:Gem::Requirement
72
148
  requirements:
73
- - - ">="
149
+ - - "~>"
74
150
  - !ruby/object:Gem::Version
75
- version: '0'
151
+ version: '1.9'
76
152
  type: :development
77
153
  prerelease: false
78
154
  version_requirements: !ruby/object:Gem::Requirement
79
155
  requirements:
80
- - - ">="
156
+ - - "~>"
81
157
  - !ruby/object:Gem::Version
82
- version: '0'
158
+ version: '1.9'
159
+ - !ruby/object:Gem::Dependency
160
+ name: rubocop-minitest
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - "~>"
164
+ - !ruby/object:Gem::Version
165
+ version: '0.10'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: '0.10'
83
173
  - !ruby/object:Gem::Dependency
84
174
  name: rubocop-performance
85
175
  requirement: !ruby/object:Gem::Requirement
86
176
  requirements:
87
- - - ">="
177
+ - - "~>"
88
178
  - !ruby/object:Gem::Version
89
- version: '0'
179
+ version: '1.9'
90
180
  type: :development
91
181
  prerelease: false
92
182
  version_requirements: !ruby/object:Gem::Requirement
93
183
  requirements:
94
- - - ">="
184
+ - - "~>"
185
+ - !ruby/object:Gem::Version
186
+ version: '1.9'
187
+ - !ruby/object:Gem::Dependency
188
+ name: simplecov
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - "<"
192
+ - !ruby/object:Gem::Version
193
+ version: '0.18'
194
+ type: :development
195
+ prerelease: false
196
+ version_requirements: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - "<"
95
199
  - !ruby/object:Gem::Version
96
- version: '0'
200
+ version: '0.18'
97
201
  description:
98
202
  email:
99
203
  - maximomussini@gmail.com
@@ -109,6 +213,7 @@ files:
109
213
  - exe/vite
110
214
  - lib/tasks/vite.rake
111
215
  - lib/vite_ruby.rb
216
+ - lib/vite_ruby/build.rb
112
217
  - lib/vite_ruby/builder.rb
113
218
  - lib/vite_ruby/cli.rb
114
219
  - lib/vite_ruby/cli/build.rb
@@ -128,8 +233,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
128
233
  licenses:
129
234
  - MIT
130
235
  metadata:
131
- source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@1.0.5/vite_ruby
132
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@1.0.5/vite_ruby/CHANGELOG.md
236
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@1.1.0/vite_ruby
237
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@1.1.0/vite_ruby/CHANGELOG.md
133
238
  post_install_message:
134
239
  rdoc_options: []
135
240
  require_paths: