Sha256: 7dbc319787fe68befce0c1dbc34ed8e9bfcc1b5061310c4419a565b9c82e12cc

Contents?: true

Size: 902 Bytes

Versions: 58

Compression:

Stored size: 902 Bytes

Contents

# frozen_string_literal: true

module Extension
  module Models
    module ServerConfig
      class DevelopmentEntries < Base
        include SmartProperties

        JAVASCRIPT = "javascript"
        JAVASCRIPT_REACT = "javascript-react"
        TYPESCRIPT = "typescript"
        TYPESCRIPT_REACT = "typescript-react"

        VALID_ENTRY_POINTS = [
          "src/index.js",
          "src/index.jsx",
          "src/index.ts",
          "src/index.tsx",
        ]

        property! :main, accepts: VALID_ENTRY_POINTS

        def self.find(template)
          case template
          when JAVASCRIPT
            new(main: "src/index.js")
          when JAVASCRIPT_REACT
            new(main: "src/index.jsx")
          when TYPESCRIPT
            new(main: "src/index.ts")
          when TYPESCRIPT_REACT
            new(main: "src/index.tsx")
          end
        end
      end
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
shopify-cli-2.36.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.35.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.34.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.33.1 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.33.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.32.1 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.32.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.31.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.30.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.29.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.28.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.27.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.26.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.25.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.24.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.23.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.22.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.21.0 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.20.1 lib/project_types/extension/models/server_config/development_entries.rb
shopify-cli-2.20.0 lib/project_types/extension/models/server_config/development_entries.rb