Sha256: 8ca259ad26a173b7379734ee782ee2246c60c5c2dd007518bb4775f22885dbbd

Contents?: true

Size: 731 Bytes

Versions: 161

Compression:

Stored size: 731 Bytes

Contents

module Rails
  module Generators
    class AssetsGenerator < NamedBase # :nodoc:
      class_option :javascripts, type: :boolean, desc: "Generate JavaScripts"
      class_option :stylesheets, type: :boolean, desc: "Generate Stylesheets"

      class_option :javascript_engine, desc: "Engine for JavaScripts"
      class_option :stylesheet_engine, desc: "Engine for Stylesheets"

      protected

      def asset_name
        file_name
      end

      hook_for :javascript_engine do |javascript_engine|
        invoke javascript_engine, [name] if options[:javascripts]
      end

      hook_for :stylesheet_engine do |stylesheet_engine|
        invoke stylesheet_engine, [name] if options[:stylesheets]
      end
    end
  end
end

Version data entries

161 entries across 156 versions & 12 rubygems

Version Path
railties-4.2.11.3 lib/rails/generators/rails/assets/assets_generator.rb
railties-4.2.11.2 lib/rails/generators/rails/assets/assets_generator.rb
railties-5.0.7.2 lib/rails/generators/rails/assets/assets_generator.rb
railties-4.2.11.1 lib/rails/generators/rails/assets/assets_generator.rb
railties-5.0.7.1 lib/rails/generators/rails/assets/assets_generator.rb
railties-4.2.11 lib/rails/generators/rails/assets/assets_generator.rb
railties-5.0.7 lib/rails/generators/rails/assets/assets_generator.rb
railties-4.2.10 lib/rails/generators/rails/assets/assets_generator.rb
railties-4.2.10.rc1 lib/rails/generators/rails/assets/assets_generator.rb
railties-5.0.6 lib/rails/generators/rails/assets/assets_generator.rb
railties-5.0.6.rc1 lib/rails/generators/rails/assets/assets_generator.rb
railties-5.0.5 lib/rails/generators/rails/assets/assets_generator.rb
railties-5.0.5.rc2 lib/rails/generators/rails/assets/assets_generator.rb
railties-5.0.5.rc1 lib/rails/generators/rails/assets/assets_generator.rb
railties-4.2.9 lib/rails/generators/rails/assets/assets_generator.rb
railties-4.2.9.rc2 lib/rails/generators/rails/assets/assets_generator.rb
railties-5.0.4 lib/rails/generators/rails/assets/assets_generator.rb
railties-5.0.4.rc1 lib/rails/generators/rails/assets/assets_generator.rb
railties-4.2.9.rc1 lib/rails/generators/rails/assets/assets_generator.rb
railties-5.0.3 lib/rails/generators/rails/assets/assets_generator.rb