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" packages={[ ExternalPackage, { version?: string; kind?: "dependencies" | "peerDependencies" | "devDependencies"; } ][]} path="string" peerDependencies={Record<string, string>} repository={string | { type: string; url: string; }} scripts={Record<string, string>} tsConfig={{ outDir?: string; }} type={"module" | "commonjs"} version="string"> {children}</PackageDirectory>import { PackageDirectory } from "@alloy-js/typescript/stc";
PackageDirectory({ author: string, dependencies: Record<string, string>, description: string, devDependencies: Record<string, string>, exports: PackageExports | ExportPath, homepage: string, keywords: string[], license: string, name: string, packages: [ ExternalPackage, { version?: string; kind?: "dependencies" | "peerDependencies" | "devDependencies"; } ][], path: string, peerDependencies: Record<string, string>, repository: string | { type: string; url: string; }, scripts: Record<string, string>, tsConfig: { outDir?: string; }, type: "module" | "commonjs", version: string,}).children(children)| author | optionalstringThe author of the package |
| children | optionalChildren |
| dependencies | optionalRecord<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. |
| description | optionalstringThe description of the package |
| devDependencies | optionalRecord<string, string>The dev dependencies of the package. |
| exports | optionalPackageExports | ExportPathThe hard-coded exports of the package. |
| homepage | optionalstringThe homepage of the package |
| keywords | optionalstring[]The keywords of the package |
| license | optionalstringThe license of the package |
| name | stringThe name of the package |
| packages | optional[
ExternalPackage,
{
version?: string;
kind?: “dependencies” | “peerDependencies” | “devDependencies”;
}
][]Optional configuration values for referenced external packages.
By default, external packages are added as regular dependencies.
However you can specify |
| path | optionalstring |
| peerDependencies | optionalRecord<string, string>The peer dependencies of the package. |
| repository | optionalstring | {
type: string;
url: string;
}The repository of the package |
| scripts | optionalRecord<string, string>The scripts entries of the package. |
| tsConfig | optional{
outDir?: string;
} |
| type | optional”module” | “commonjs”Whether this is a commonjs or module. Defaults to module. |
| version | stringThe version of the package |