Sha256: 17fc0d94b333e3624a759ac89e3dba894e876f395d182e9be01c032319e3c2fa

Contents?: true

Size: 840 Bytes

Versions: 1

Compression:

Stored size: 840 Bytes

Contents

module AnchorUi
  module Sprockets
    class InstallGenerator < Rails::Generators::Base
      include(
        AnchorUi::Core::Generators::Concerns::Install,
        Paths
      )

      source_root File.expand_path('../templates', __FILE__)

      def copy_assets
        filename = 'application.js'
        copy_file filename, javascripts_path.join(filename)

        %w(application _variables _coreui).each do |name|
          filename = "#{name}.scss"
          copy_file filename, stylesheets_path.join(filename)
        end
      end

      def delete_application_css
        remove_file 'app/assets/stylesheets/application.css'
      end

      def override_layout
        generate_layout 'include', 'link', 'application'
      end

      private

      def assets_path
        Pathname.new 'app/assets'
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
anchor_ui-sprockets-5.2.0.1 lib/generators/anchor_ui/sprockets/install_generator.rb