Class: ShopifyCLI::Theme::Extension::DevServer

Inherits:
DevServer
  • Object
show all
Defined in:
lib/shopify_cli/theme/extension/dev_server.rb,
lib/shopify_cli/theme/extension/dev_server/watcher.rb,
lib/shopify_cli/theme/extension/dev_server/hot_reload.rb,
lib/shopify_cli/theme/extension/dev_server/local_assets.rb,
lib/shopify_cli/theme/extension/dev_server/proxy_param_builder.rb,
lib/shopify_cli/theme/extension/dev_server/hooks/file_change_hook.rb,
lib/shopify_cli/theme/extension/dev_server/hot_reload/script_injector.rb

Defined Under Namespace

Modules: Hooks Classes: HotReload, LocalAssets, ProxyParamBuilder, Watcher

Constant Summary collapse

Proxy =

Themes

ShopifyCLI::Theme::DevServer::Proxy
CdnFonts =
ShopifyCLI::Theme::DevServer::CdnFonts
ScriptInjector =

Extensions

ShopifyCLI::Theme::Extension::DevServer::HotReload::ScriptInjector

Constants inherited from DevServer

DevServer::HOP_BY_HOP_HEADERS

Instance Attribute Summary collapse

Attributes inherited from DevServer

#app, #block, #ctx, #editor_sync, #host, #ignores, #includes, #mode, #poll, #port, #root, #stable, #stopped, #theme_identifier

Class Method Summary collapse

Methods inherited from DevServer

#setup, #start, stop, #stop

Instance Attribute Details

#generate_tmp_themeObject

Returns the value of attribute generate_tmp_theme.



29
30
31
# File 'lib/shopify_cli/theme/extension/dev_server.rb', line 29

def generate_tmp_theme
  @generate_tmp_theme
end

#projectObject

Returns the value of attribute project.



29
30
31
# File 'lib/shopify_cli/theme/extension/dev_server.rb', line 29

def project
  @project
end

#specification_handlerObject

Returns the value of attribute specification_handler.



29
30
31
# File 'lib/shopify_cli/theme/extension/dev_server.rb', line 29

def specification_handler
  @specification_handler
end

Class Method Details

.start(ctx, root, port: 9292, theme: nil, generate_tmp_theme: false, project:, specification_handler:) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/shopify_cli/theme/extension/dev_server.rb', line 32

def start(ctx, root, port: 9292, theme: nil, generate_tmp_theme: false, project:, specification_handler:)
  instance.project = project
  instance.specification_handler = specification_handler
  instance.generate_tmp_theme = generate_tmp_theme

  super(ctx, root, port: port, theme: theme)
end