Class: Kaze::Commands::InstallCommand
- Inherits:
-
Thor
- Object
- Thor
- Kaze::Commands::InstallCommand
- Includes:
- InstallsHotwireStack, InstallsInertiaStacks
- Defined in:
- lib/kaze/commands/install_command.rb
Instance Method Summary collapse
Instance Method Details
#install(stack = 'hotwire') ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/kaze/commands/install_command.rb', line 11 def install(stack = 'hotwire') return say 'Kaze must be run in a new Rails application.', :red unless File.exist?("#{Dir.pwd}/bin/rails") if stack == 'hotwire' return install_hotwire_stack end if stack == 'react' return install_inertia_react_stack end if stack == 'vue' return install_inertia_vue_stack end say 'Invalid stack. Supported stacks are [hotwire], [react], [vue].', :red end |