Class: Extension::Models::ServerConfig::DevelopmentRenderer

Inherits:
Base
  • Object
show all
Includes:
SmartProperties
Defined in:
lib/project_types/extension/models/server_config/development_renderer.rb

Constant Summary collapse

VALID_RENDERERS =
[
  "@shopify/admin-ui-extensions",
  "@shopify/post-purchase-ui-extensions",
  "@shopify/checkout-ui-extensions",
  "@shopify/retail-ui-extensions",
]

Class Method Summary collapse

Methods inherited from Base

#to_h, #to_hash

Class Method Details

.find(type) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/project_types/extension/models/server_config/development_renderer.rb', line 19

def self.find(type)
  case type.downcase
  when "product_subscription"
    new(name: "@shopify/admin-ui-extensions", version: "^1.0.1")
  when "checkout_ui_extension"
    new(name: "@shopify/checkout-ui-extensions", version: "^0.15.0")
  when "checkout_post_purchase"
    new(name: "@shopify/post-purchase-ui-extensions", version: "^0.13.2")
  when "pos_ui_extension"
    new(name: "@shopify/retail-ui-extensions", version: "^0.12.0")
  when "web_pixel_extension"
    nil
  else
    raise ArgumentError, "Unknown extension type: #{type}"
  end
end