Skip to content

ProjectType

Union type for project types.

Definition

tsx
type ProjectType = 'github' | 'manual' | 'npm' | 'product-hunt' | 'youtube' | 'gumroad' | 'lemonsqueezy' | 'devto' | 'hybrid'

Values

ValueDescription
githubGitHub repository
manualManual configuration
npmnpm package
product-huntProduct Hunt launch
youtubeYouTube channel
gumroadGumroad product
lemonsqueezyLemon Squeezy store
devtoDev.to user profile
hybridGitHub + npm combination

Usage

tsx
import type { ProjectType } from '@manningworks/projex'

function getIcon(type: ProjectType): string {
  switch (type) {
    case 'github': return 'github'
    case 'npm': return 'package'
    case 'product-hunt': return 'rocket'
    case 'youtube': return 'video'
    case 'gumroad': return 'shopping-cart'
    case 'lemonsqueezy': return 'store'
    case 'devto': return 'article'
    case 'hybrid': return 'link'
    case 'manual': return 'file'
  }
}

Type-Specific Behavior

TypeFetches DataRequired Fields
githubYesrepo
manualNoNone
npmYespackage
product-huntYesslug
youtubeYeschannelId
gumroadYesproductId
lemonsqueezyYesstoreId
devtoYesusername
hybridYesrepo, package