Skip to content

PackageDirectory

import { PackageDirectory } from "@alloy-js/typescript";
<PackageDirectory
author="string"
dependencies={Record<string, string>}
description="string"
devDependencies={Record<string, string>}
exports={PackageExports | ExportPath}
homepage="string"
keywords={string[]}
license="string"
name="string"
path="string"
repository={string | {
type: string;
url: string;
}}
scripts={Record<string, string>}
tsConfig={{
outDir?: string;
}}
type={"module" | "commonjs"}
version="string"
>
{children}
</PackageDirectory>

Props

authoroptionalstring

The author of the package

childrenoptionalChildren
dependenciesoptionalRecord<string, string>

The hard-coded dependencies of the package. References to external packages will add to the dependency list automatically. Only list dependencies here that are not referenced via refkey.

descriptionoptionalstring

The description of the package

devDependenciesoptionalRecord<string, string>

The dev dependencies of the package.

exportsoptionalPackageExports | ExportPath

The hard-coded exports of the package.

homepageoptionalstring

The homepage of the package

keywordsoptionalstring[]

The keywords of the package

licenseoptionalstring

The license of the package

namestring

The name of the package

pathoptionalstring
repositoryoptionalstring | { type: string; url: string; }

The repository of the package

scriptsoptionalRecord<string, string>

The scripts entries of the package.

tsConfigoptional{ outDir?: string; }
typeoptional”module” | “commonjs”

Whether this is a commonjs or module. Defaults to module.

versionstring

The version of the package