Sha256: 6eb9b53c2335ced9fea7e3329a494212086fccb3c3264cdd651638f02a5ebf06

Contents?: true

Size: 923 Bytes

Versions: 2

Compression:

Stored size: 923 Bytes

Contents

module Elements
  module Generators
    class InstallGenerator < Rails::Generators::Base
      desc "Setup the app to use the css files and modify the main application layout. It will use haml for all templates"

      def self.source_root
        @_elements_source_root ||= File.expand_path("../../../../../", __FILE__)
      end

      def copy_layout
        copy_file 'app/views/layouts/application.html.haml'
        remove_file 'app/views/layouts/application.html.erb'
      end
      
      def copy_javascript
        copy_file 'app/assets/javascripts/application.js'
      end
      
      def copy_stylesheet
        copy_file 'app/assets/stylesheets/application.css'
      end

      def copy_helpers
        copy_file 'app/helpers/layout_helper.rb'
        copy_file 'app/helpers/error_messages_helper.rb'
      end

      def insert_gems
        gem 'haml'
        gem 'haml-rails'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
elements-0.2.1 lib/generators/elements/install/install_generator.rb
elements-0.2.0 lib/generators/elements/install/install_generator.rb