Class: RailsuiIcon::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- RailsuiIcon::Generators::InstallGenerator
- Defined in:
- lib/generators/railsui_icon/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_initializer_file ⇒ Object
6 7 8 |
# File 'lib/generators/railsui_icon/install/install_generator.rb', line 6 def create_initializer_file template "railsui_icon.rb", "config/initializers/railsui_icon.rb" end |
#update_tailwind_config ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/generators/railsui_icon/install/install_generator.rb', line 10 def update_tailwind_config tailwind_config_path = Rails.root.join("tailwind.config.js") return unless File.exist?(tailwind_config_path) insert_into_file tailwind_config_path.to_s, after: /content: \[\n/ do " \"./config/initializers/railsui_icon.rb\",\n" end end |