Skip to main content

create-baeta

Interfaces

Args

Properties

PropertyType

rootDir

string

appName?

string

packageManager?

"npm" | "yarn" | "pnpm" | "bun"

skipInstall?

boolean

template?

string


CliOptions

Properties

PropertyType

packageManager?

"npm" | "yarn" | "pnpm" | "bun"

skipInstall?

boolean

Type Aliases

JavaScriptRuntime

JavaScriptRuntime: typeof runtimes[number]


PackageManager

PackageManager: keyof typeof lockfileNames


Template

Template: object

Type declaration

NameType

name

string

path

string

packageJsn?

string

Variables

defaultJavaScriptRuntime

const defaultJavaScriptRuntime: "node" = 'node'


defaultPackageManager

const defaultPackageManager: "npm" = 'npm'


gitignoreUrl

const gitignoreUrl: "https://raw.githubusercontent.com/github/gitignore/refs/heads/main/Node.gitignore" = 'https://raw.githubusercontent.com/github/gitignore/refs/heads/main/Node.gitignore'


lockfileNames

const lockfileNames: object

Type declaration

NameTypeDefault value

bun

string

'bun.lockb'

npm

string

'package-lock.json'

pnpm

string

'pnpm-lock.yaml'

yarn

string

'yarn.lock'


packageManagers

const packageManagers: ("npm" | "yarn" | "pnpm" | "bun")[]


runtimes

const runtimes: readonly ["node", "deno", "bun"]

Functions

copyTemplate()

copyTemplate(appName, runtime, template, dest): Promise<void>

Parameters

ParameterType

appName

string

runtime

"bun" | "node" | "deno"

template

Template

dest

string

Returns

Promise<void>


createTsconfig()

createTsconfig(): object

Returns

object

NameTypeDefault value
$schemastring"https://json.schemastore.org/tsconfig"
compilerOptionsobject-
compilerOptions.allowImportingTsExtensionsbooleantrue
compilerOptions.allowSyntheticDefaultImportsbooleantrue
compilerOptions.emitDeclarationOnlybooleanfalse
compilerOptions.esModuleInteropbooleantrue
compilerOptions.forceConsistentCasingInFileNamesbooleantrue
compilerOptions.isolatedModulesbooleantrue
compilerOptions.libstring[]-
compilerOptions.modulestring"esnext"
compilerOptions.moduleResolutionstring"bundler"
compilerOptions.noEmitbooleantrue
compilerOptions.noImplicitAnybooleantrue
compilerOptions.outDirstring'dist'
compilerOptions.rootDirstring'src'
compilerOptions.skipLibCheckbooleantrue
compilerOptions.strictbooleantrue
compilerOptions.targetstring"es2023"
compilerOptions.verbatimModuleSyntaxbooleantrue
excludestring[]-

getAppName()

getAppName(reqName, rootDir): Promise<string>

Parameters

ParameterType

reqName

undefined | string

rootDir

string

Returns

Promise<string>


getInstallCommand()

getInstallCommand(pkgManager): string

Parameters

ParameterType

pkgManager

"npm" | "yarn" | "pnpm" | "bun"

Returns

string


getPackageJson()

getPackageJson(appName, runtime, templateName): undefined | string

Parameters

ParameterType

appName

string

runtime

"bun" | "node" | "deno"

templateName

string

Returns

undefined | string


getPackageManager()

getPackageManager(dest, __namedParameters): Promise<PackageManager>

Parameters

ParameterType

dest

string

__namedParameters

CliOptions

Returns

Promise<PackageManager>


getRuntime()

getRuntime(): Promise<JavaScriptRuntime>

Returns

Promise<JavaScriptRuntime>


getTemplate()

getTemplate(reqTemplate): Promise<Template>

Parameters

ParameterType

reqTemplate

undefined | string

Returns

Promise<Template>


handler()

handler(args): Promise<void>

Parameters

ParameterType

args

Args

Returns

Promise<void>