Sha256: 300041cdc5bcb8f2415510a3b32db030b36b0c9378c293488d9a81e686bee0c6
Contents?: true
Size: 983 Bytes
Versions: 6
Compression:
Stored size: 983 Bytes
Contents
# frozen_string_literal: true require "shopify_cli" module Extension module Tasks module Converters module ServerConfigConverter def self.from_hash(hash, type) context.abort(context.message("tasks.errors.parse_error")) if hash.nil? project = ExtensionProject.current extension = Models::ServerConfig::Extension.new( uuid: project.registration_uuid, type: type.upcase, user: Models::ServerConfig::User.new, development: Models::ServerConfig::Development.new( build_dir: hash.dig("development", "build_dir"), renderer: Models::ServerConfig::DevelopmentRenderer.find(type), entries: Models::ServerConfig::DevelopmentEntries.new( main: hash.dig("development", "entries", "main") ) ) ) Models::ServerConfig::Root.new(extensions: [extension]) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems