Class: Inertia::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Inertia::Generators::InstallGenerator
- Includes:
- Helpers
- Defined in:
- lib/generators/inertia/install/install_generator.rb
Constant Summary collapse
- FRAMEWORKS =
YAML.load_file(File.('./frameworks.yml', __dir__))
Instance Method Summary collapse
Methods included from Helpers
#ask, #file?, #file_path, #js_destination_path, #js_destination_root, #js_file_path, #yes?
Instance Method Details
#install ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/generators/inertia/install/install_generator.rb', line 49 def install say "Installing Inertia's Rails adapter" if inertia_resolved_version.version == '0' say_error "Could not find the Inertia.js package version #{[:inertia_version]}.", :red exit(false) end install_vite unless ruby_vite_installed? install_typescript if typescript? install_tailwind if install_tailwind? install_inertia install_example_page if [:example_page] say 'Copying bin/dev' copy_file "#{__dir__}/templates/dev", 'bin/dev' chmod 'bin/dev', 0o755, verbose: verbose? say "Inertia's Rails adapter successfully installed", :green end |