Sha256: f56cfdccba867c345e9bf8a99242d6ada09446e7f543bd53f158b50257a336e1

Contents?: true

Size: 824 Bytes

Versions: 12

Compression:

Stored size: 824 Bytes

Contents

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

module AmpHtml
    module Generators

        class AssetsGenerator < Rails::Generators::Base

            source_root File.expand_path '../../templates/assets', __FILE__
            desc 'Generate assets to allow for use of the asset pipeline.'


            # ASSETS
            class_option :stylesheets, desc: 'Generate stylesheet assets', type: :boolean, default: false, aliases: '-st'



            def create_stylesheet_assets
                if options.size < 0 || options[:stylesheets]
                    template 'stylesheets/application.scss', 'app/assets/stylesheets/amp/application.scss'
                end
            end

            def show_readme
                readme 'README.md'
            end

        end

    end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
amp-html-0.7.18 lib/generators/amp_html/assets_generator.rb
amp-html-0.7.17 lib/generators/amp_html/assets_generator.rb
amp-html-0.7.16 lib/generators/amp_html/assets_generator.rb
amp-html-0.7.15 lib/generators/amp_html/assets_generator.rb
amp-html-0.7.14 lib/generators/amp_html/assets_generator.rb
amp-html-0.7.13 lib/generators/amp_html/assets_generator.rb
amp-html-0.7.12 lib/generators/amp_html/assets_generator.rb
amp-html-0.7.11 lib/generators/amp-html/assets_generator.rb
amp-html-0.7.10 lib/generators/amp-html/assets_generator.rb
amp-html-0.7.9 lib/generators/amp-html/assets_generator.rb
amp-html-0.7.8 lib/generators/amphtml/assets_generator.rb
amp-html-0.7.7 lib/generators/amphtml/assets_generator.rb