Sha256: 1c8cccaf722d9ae5b25a64778e3dfeeb52efb726f4af05c7a3d0b84a58680721

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

module I0n
  module Generators
    class LayoutGenerator < Rails::Generators::Base

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

      def gemfile
        # File minification 
        gem 'smurf', '1.0.6'
        # Templates
        gem 'haml'
        gem 'haml-rails' 
        # Stylesheets
        gem "compass", '0.10.6'
        gem 'compass-susy-plugin', '0.8.1'
      end

      def setup_application
        application do
          "
      config.generators do |g|
        g.stylesheets false
        g.template_engine :haml
      end
          "
        end  
      end

      def create_compass_config
        copy_file "config/initializers/compass.rb", "#{Rails.root}/config/initializers/compass.rb" 
        copy_file "config/compass.rb", "#{Rails.root}/config/compass.rb"
      end

      def create_sass_extensions
        copy_file "lib/sass_extensions.rb", "#{Rails.root}/lib/sass_extensions.rb" 
      end

      def create_sass_directory
        directory "app/sass", "#{Rails.root}/app/sass"    
      end

      def create_layout
        copy_file "app/views/layouts/application.haml", "#{Rails.root}/app/views/layouts/application.haml"
        copy_file "app/views/shared/_error_messages.haml", "#{Rails.root}/app/views/shared/_error_messages.haml" 
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i0n_rails3_generators-0.2.8 lib/generators/i0n/layout/layout_generator.rb