detectProjectType

Type:Function
Status:beta
Since:1.0.0
Platform:node
@blackbyte.sugar.node.project

This function allows you to detect the project type like “next”, “nuxt”, etc… If the project type is not detected, it will return “unknown” for the type and “1.0.0” for the version. Here the list of detected project types:

  • next
  • nuxt
  • astro
  • remix
  • sveltekit
  • laravel

Params

  1. cwd”process.cwd()“String

    The root project directory to detect the type from

Return

  1. -IDetectProjectTypeResult

    An object that describe the detected project type

Example

import { detectProjectType } from '@blackbyte/sugar/project';
detectProjectType();