Sha256: c5c6d8353b8cb9b515519914b356b4303938f7b34eb90923ff0f92a9c9107e18

Contents?: true

Size: 629 Bytes

Versions: 5

Compression:

Stored size: 629 Bytes

Contents

# frozen_string_literal: true
require "shopify_cli/theme/dev_server"

module Theme
  class Command
    class Serve < ShopifyCLI::SubCommand
      options do |parser, flags|
        parser.on("--port=PORT") { |port| flags[:port] = port.to_i }
      end

      def call(*)
        flags = options.flags.dup
        ShopifyCLI::Theme::DevServer.start(@ctx, ".", **flags) do |syncer|
          UI::SyncProgressBar.new(syncer).progress(:upload_theme!, delay_low_priority_files: true)
        end
      end

      def self.help
        ShopifyCLI::Context.message("theme.serve.help", ShopifyCLI::TOOL_NAME)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
shopify-cli-2.6.3 lib/project_types/theme/commands/serve.rb
shopify-cli-2.6.2 lib/project_types/theme/commands/serve.rb
shopify-cli-2.6.1 lib/project_types/theme/commands/serve.rb
shopify-cli-2.6.0 lib/project_types/theme/commands/serve.rb
shopify-cli-2.5.0 lib/project_types/theme/commands/serve.rb