Sha256: fc0286a342d2cbe6b34a4f89081cb4c0249394ecd21bc2fa7f6f76ff6239548a

Contents?: true

Size: 545 Bytes

Versions: 53

Compression:

Stored size: 545 Bytes

Contents

# frozen_string_literal: true

module RailsAppGenerator
  # Custom add-ons for RailsAppGenerator
  module AddOns
    # Add Tailwind CSS support to rails application
    class Tailwind < RailsAppGenerator::Addon
      depends_on :javascript

      def apply
        rails_command('tailwindcss:install')
        template('app/javascript/stylesheets/components.scss')
        insert_into_file 'app/javascript/stylesheets/application.scss' do
          <<~CSS

            @import "components";
          CSS
        end
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.3.5 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.3.4 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.3.3 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.3.2 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.3.1 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.3.0 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.43 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.42 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.41 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.40 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.39 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.38 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.37 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.36 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.35 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.34 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.33 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.32 lib/rails_app_generator/addons/tailwind.rb
rails_app_generator-0.2.31 lib/rails_app_generator/addons/tailwind.rb