Class: ViteRuby::CLI::Install

Inherits:
Dry::CLI::Command
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/vite_ruby/cli/install.rb

Direct Known Subclasses

Upgrade, UpgradePackages

Instance Method Summary collapse

Instance Method Details

#call(package_manager: nil) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/vite_ruby/cli/install.rb', line 11

def call(package_manager: nil, **)
  ENV["VITE_RUBY_PACKAGE_MANAGER"] ||= package_manager if package_manager

  $stdout.sync = true

  say "Creating binstub"
  ViteRuby.commands.install_binstubs

  say "Creating configuration files"
  create_configuration_files

  say "Installing sample files"
  install_sample_files

  say "Installing js dependencies"
  install_js_dependencies

  say "Adding files to .gitignore"
  install_gitignore

  say "\nVite ⚡️ Ruby successfully installed! 🎉"
end