Sha256: 1e737487df867b971d56477f1f5dd3af31471e303e14de64b36208b732cc89f6

Contents?: true

Size: 629 Bytes

Versions: 8

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

8 entries across 8 versions & 1 rubygems

Version Path
shopify-cli-2.4.0 lib/project_types/theme/commands/serve.rb
shopify-cli-2.3.0 lib/project_types/theme/commands/serve.rb
shopify-cli-2.2.2 lib/project_types/theme/commands/serve.rb
shopify-cli-2.2.1 lib/project_types/theme/commands/serve.rb
shopify-cli-2.2.0 lib/project_types/theme/commands/serve.rb
shopify-cli-2.1.0 lib/project_types/theme/commands/serve.rb
shopify-cli-2.0.2 lib/project_types/theme/commands/serve.rb
shopify-cli-2.0.1 lib/project_types/theme/commands/serve.rb