Sha256: fbfa66815af4c2b6b6b78cf1fbc31644731836bcfacd6845f940efa0c3757d0d

Contents?: true

Size: 607 Bytes

Versions: 12

Compression:

Stored size: 607 Bytes

Contents

module RailsuiIcon
  module Generators
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path("templates", __dir__)

      def create_initializer_file
        template "railsui_icon.rb", "config/initializers/railsui_icon.rb"
      end

      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
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
railsui_icon-1.1.1 lib/generators/railsui_icon/install/install_generator.rb
railsui_icon-1.1.0 lib/generators/railsui_icon/install/install_generator.rb
railsui_icon-1.0.9 lib/generators/railsui_icon/install/install_generator.rb
railsui_icon-1.0.8 lib/generators/railsui_icon/install/install_generator.rb
railsui_icon-1.0.7 lib/generators/railsui_icon/install/install_generator.rb
railsui_icon-1.0.6 lib/generators/railsui_icon/install/install_generator.rb
railsui_icon-1.0.5 lib/generators/railsui_icon/install/install_generator.rb
railsui_icon-1.0.4 lib/generators/railsui_icon/install/install_generator.rb
railsui_icon-1.0.3 lib/generators/railsui_icon/install/install_generator.rb
railsui_icon-1.0.2 lib/generators/railsui_icon/install/install_generator.rb
railsui_icon-1.0.1 lib/generators/railsui_icon/install/install_generator.rb
railsui_icon-1.0.0 lib/generators/railsui_icon/install/install_generator.rb