Sha256: 3d020dcaccf1336d0067e7c65dc88416ed639f56867d32247ec5e20ba9ffbd18

Contents?: true

Size: 870 Bytes

Versions: 4

Compression:

Stored size: 870 Bytes

Contents

module SpreeActiveSale
  module Generators
    class AssetsGenerator < Rails::Generators::Base

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

      desc 'Copies the assets from spree_active_sale plugin to the applciation\'s assets folder.'

      def copy_locale
        directory assets_source_path, assets_destination_path
        directory js_source_path, js_destination_path
      end

      def show_readme
        readme 'README.md' if behavior == :invoke
      end

      private

      def assets_source_path
        '../../../../vendor/assets/stylesheets/'
      end
      
      def assets_destination_path
        'app/assets/stylesheets/'
      end
      
      def js_source_path
        '../../../../vendor/assets/javascripts/'
      end
      
      def js_destination_path
        'app/assets/javascripts/'
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_active_sale-2.0.0 lib/generators/spree_active_sale/assets/assets_generator.rb
spree_active_sale-1.3.2 lib/generators/spree_active_sale/assets/assets_generator.rb
spree_active_sale-1.3.1 lib/generators/spree_active_sale/assets/assets_generator.rb
spree_active_sale-1.3.0 lib/generators/spree_active_sale/assets/assets_generator.rb