Sha256: 938e718cfe3ed18ee05bbec29b7c16e79cc32e44d93bdbcd5c0bcb909cbd1b5f

Contents?: true

Size: 778 Bytes

Versions: 2

Compression:

Stored size: 778 Bytes

Contents

require 'rails/generators/base'
require 'thor'

module AmpHtml
    module Generators

        class AmpHtmlGenerator < Rails::Generators::Base

            source_root File.join File.dirname(__FILE__), 'templates'
            desc 'Install amp-html'

            def create_layout
                template 'layout.html.erb', 'app/views/layouts/amp.html.erb'
            end

            def create_assets
                template 'application.sass', 'app/assets/stylesheets/amp/application.sass'
                template '.keep-file', 'app/assets/stylesheets/amp/packages/.keep'
            end

            def create_initializer
                template 'initializer.rb', 'config/initializers/amp-html.rb'
            end

        end

    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
amp-html-1.2.1 lib/generators/amp_html_generator.rb
amp-html-1.2.0 lib/generators/amp_html_generator.rb