lib/vite_ruby.rb in vite_ruby-1.0.5 vs lib/vite_ruby.rb in vite_ruby-1.1.0
- old
+ new
@@ -26,11 +26,10 @@
class << self
extend Forwardable
def_delegators :instance, :config, :commands, :run_proxy?
def_delegators :config, :mode
- def_delegators 'ViteRuby::Runner.new', :run
def instance
@instance ||= ViteRuby.new
end
@@ -50,10 +49,15 @@
# Internal: Loads all available rake tasks.
def install_tasks
load File.expand_path('tasks/vite.rake', __dir__)
end
+ # Internal: Executes the vite binary.
+ def run(argv, **options)
+ ViteRuby::Runner.new(instance).run(argv, **options)
+ end
+
# Internal: Refreshes the config after setting the env vars.
def reload_with(env_vars)
env.update(env_vars)
@instance = nil
config
@@ -72,12 +76,9 @@
[framework, library]
end
}.compact
end
end
-
- extend Forwardable
- def_delegators :builder, :build
attr_writer :logger
def logger
@logger ||= Logger.new($stdout)