Sha256: a7f552b1d1057d6d6de3dd2b16b8ceca79b085bdde2bd34d0bffe7c9cf521436

Contents?: true

Size: 842 Bytes

Versions: 5

Compression:

Stored size: 842 Bytes

Contents

module TextileEditorHelper
  module Generators
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path('../../../../vendor', __FILE__)
      desc 'Creates a TextileEditorHelper initializer and copies assets to app/assets'
      def copy_assets
        js_destination = 'app/assets/javascripts'
        css_destination = 'app/assets/stylesheets'
        copy_file 'assets/javascripts/textile-editor.js', "#{js_destination}/textile-editor.js"
        copy_file 'assets/javascripts/textile-editor-config.js', "#{js_destination}/textile-editor-config.js"
        copy_file 'assets/stylesheets/textile-editor.css', "#{css_destination}/textile-editor.css"
        directory 'assets/images/textile-editor', 'app/assets/images/textile-editor'
        readme 'README' if behavior == :invoke
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
textile_editor_helper-0.1.4 lib/generators/textile_editor_helper/install_generator.rb
textile_editor_helper-0.1.3 lib/generators/textile_editor_helper/install_generator.rb
textile_editor_helper-0.1.2 lib/generators/textile_editor_helper/install_generator.rb
textile_editor_helper-0.1.1 lib/generators/textile_editor_helper/install_generator.rb
textile_editor_helper-0.1.0 lib/generators/textile_editor_helper/install_generator.rb