Sha256: 444806f366334dd6f41e327881d93bc63cf0197c80e1fb853b29b24cd4ef30d9

Contents?: true

Size: 1.28 KB

Versions: 30

Compression:

Stored size: 1.28 KB

Contents

module ShopifyCLI
  module Commands
    class App
      class Serve < ShopifyCLI::Command::AppSubCommand
        include ShopifyCLI::CommandOptions::CommandServeOptions

        prerequisite_task :ensure_env, :ensure_dev_store

        recommend_default_ruby_range

        parse_host_option
        parse_port_option
        parse_no_update_option

        def call(*)
          case detect_app
          when :rails
            Services::App::Serve::RailsService.call(
              host: host,
              port: port,
              no_update: no_update,
              context: @ctx
            )
          when :node
            Services::App::Serve::NodeService.call(
              host: host,
              port: port,
              no_update: no_update,
              context: @ctx
            )
          when :php
            Services::App::Serve::PHPService.call(
              host: host,
              port: port,
              no_update: no_update,
              context: @ctx
            )
          end
        end

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

        def self.extended_help
          ShopifyCLI::Context.message("core.app.serve.extended_help")
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
shopify-cli-2.36.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.35.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.34.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.33.1 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.33.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.32.1 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.32.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.31.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.30.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.29.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.28.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.27.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.26.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.25.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.24.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.23.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.22.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.21.0 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.20.1 lib/shopify_cli/commands/app/serve.rb
shopify-cli-2.20.0 lib/shopify_cli/commands/app/serve.rb