Sha256: bd4dc2d99ccb3cd88c56db3fbcab9e625b6e35f13280bfa66d2356961f3700e2

Contents?: true

Size: 1.36 KB

Versions: 9

Compression:

Stored size: 1.36 KB

Contents

module Spree
  module Frontend
    module Generators
      class InstallGenerator < Rails::Generators::Base
        desc 'Copies storefront configuration files for easy customization'

        def self.source_paths
          [
            File.expand_path('templates', __dir__),
            File.expand_path('../templates', "../#{__FILE__}"),
            File.expand_path('../templates', "../../#{__FILE__}"),
            File.expand_path('../../../../../app/views/spree', __dir__),
            File.expand_path('../../../../../app/assets/images', __dir__),
            File.expand_path('../../../../../app/assets/stylesheets/spree/frontend/variables', __dir__)
          ]
        end

        def install
          # main navigation configuration
          template 'config/initializers/spree_storefront.rb', 'config/initializers/spree_storefront.rb'
          template 'config/spree_storefront.yml', 'config/spree_storefront.yml'
          # static images
          directory 'noimage', './app/assets/images/noimage'
          directory 'homepage', './app/assets/images/homepage'
          directory 'meganav', './app/assets/images/meganav'
          # SCSS theming
          template 'variables.scss', './app/assets/stylesheets/spree/frontend/variables/variables.scss'
          # home page template
          directory 'home', './app/views/spree/home'
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spree_frontend-4.2.7 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.2.6 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.2.5 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.2.4 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.2.3.1 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.2.3 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.2.2 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.2.1 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.2.0 lib/generators/spree/frontend/install/install_generator.rb