Sha256: 3f86b7d57bc6c492940753dd05acc7209992a8979616de9c54b218d95e68423f

Contents?: true

Size: 765 Bytes

Versions: 13

Compression:

Stored size: 765 Bytes

Contents

# frozen_string_literal: true

require "shopify_cli/theme/theme"
require "project_types/theme/presenters/themes_presenter"
require "project_types/theme/commands/common/shop_helper"

module Theme
  class Command
    class List < ShopifyCLI::Command::SubCommand
      include Common::ShopHelper

      recommend_default_ruby_range

      def call(_args, _name)
        @ctx.puts(@ctx.message("theme.list.title", shop))

        themes_presenter.all.each do |theme|
          @ctx.puts("  #{theme}")
        end
      end

      def self.help
        @ctx.message("theme.list.help", ShopifyCLI::TOOL_NAME, ShopifyCLI::TOOL_NAME)
      end

      private

      def themes_presenter
        Theme::Presenters::ThemesPresenter.new(@ctx, nil)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
shopify-cli-2.36.0 lib/project_types/theme/commands/list.rb
shopify-cli-2.35.0 lib/project_types/theme/commands/list.rb
shopify-cli-2.34.0 lib/project_types/theme/commands/list.rb
shopify-cli-2.33.1 lib/project_types/theme/commands/list.rb
shopify-cli-2.33.0 lib/project_types/theme/commands/list.rb
shopify-cli-2.32.1 lib/project_types/theme/commands/list.rb
shopify-cli-2.32.0 lib/project_types/theme/commands/list.rb
shopify-cli-2.31.0 lib/project_types/theme/commands/list.rb
shopify-cli-2.30.0 lib/project_types/theme/commands/list.rb
shopify-cli-2.29.0 lib/project_types/theme/commands/list.rb
shopify-cli-2.28.0 lib/project_types/theme/commands/list.rb
shopify-cli-2.27.0 lib/project_types/theme/commands/list.rb
shopify-cli-2.26.0 lib/project_types/theme/commands/list.rb