Npm Factory
GitHub →

← Back to module

JSDoc

Functions

runInit

function
runInit(config: InitConfig): Promise<ResolvedConfig>

resolveConfig

function
resolveConfig(config: InitConfig): ResolvedConfig

buildPackageName

function
buildPackageName(scope: string, projectId: string, mod: { packageNameSuffix: string; }): string

packageNameToFolder

function
packageNameToFolder(packageName: string): string

Types

InitConfig

type
type InitConfig = {
  projectId: string;
  scope: string;
  modules: ModuleInput[];
  playgroundMode: PlaygroundMode;
  cwd: string;
}

ModuleInput

type
type ModuleInput = {
  moduleId: string;
  packageNameSuffix: string;
  title: string;
  description: string;
  kind: ModuleKind;
  platforms: ModulePlatform[];
  stability: ModuleStability;
}

ModuleKind

type
type ModuleKind = "core" | "integration" | "plugin" | "sdk" | "cli"

ModulePlatform

type
type ModulePlatform = | "node"
  | "browser"
  | "react"
  | "react-native"
  | "vue"
  | "svelte"
  | "solid"
  | "universal"

ModuleStability

type
type ModuleStability = "experimental" | "beta" | "stable" | "deprecated"

PlaygroundMode

type
type PlaygroundMode = "none" | "single" | "per-module"

ResolvedConfig

type
type ResolvedConfig = InitConfig & {
  siteDir: string;
  configDir: string;
  modulesResolved: ResolvedModule[];
}

ResolvedModule

type
type ResolvedModule = ModuleInput & {
  packageName: string;
  packageDir: string;
  docsDir: string;
  docsDirRelativeToSite: string;
}

Constants

defaults

const
const defaults: { readonly version: "0.1.0"; readonly license: "MIT"; readonly nodeEngines: ">=20"; readonly orphanMode: "warn"; }