Sha256: 0d1fdabfe8878140c5a8680511fd8656ab72a6439c04501466f12737c4cf4291

Contents?: true

Size: 1.27 KB

Versions: 8

Compression:

Stored size: 1.27 KB

Contents

module Spree
  module Frontend
    module Generators
      class InstallGenerator < Rails::Generators::Base
        desc 'Installs Spree rails storefront'

        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
          template 'vendor/assets/javascripts/spree/frontend/all.js'
          template 'vendor/assets/stylesheets/spree/frontend/all.css'
          # static images
          directory 'noimage', './app/assets/images/noimage'
          directory 'homepage', './app/assets/images/homepage'
          # SCSS theming
          template 'variables.scss', './app/assets/stylesheets/spree/frontend/variables/variables.scss'
          # Sprockets 4 manifest
          template 'app/assets/config/manifest.js'
          # home page template
          directory 'home', './app/views/spree/home'
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
spree_frontend-4.3.3 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.3.2 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.4.0 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.3.1 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.3.0 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.3.0.rc3 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.3.0.rc2 lib/generators/spree/frontend/install/install_generator.rb
spree_frontend-4.3.0.rc1 lib/generators/spree/frontend/install/install_generator.rb