interface JsrConfig {
    copyPackageFiles?: string[];
    copyRootFiles?: string[];
    dryRun?: boolean;
    exclude?: string[];
    finalize?: (ctx: BuildHookContext) => MaybePromise<void>;
    finalizeDenoJson?: (ctx: BuildHookContext, jsr: any) => void;
    includePackage?: (pkg: WorkspacePackage) => boolean;
    outputDir?: string;
    sourceDir?: string;
    transformAst?: (ast: SourceFile) => boolean;
    transformCode?: (path: string, code: string) => string;
}

Properties

copyPackageFiles?: string[]

files to copy from the package root directory to the package build directory

['README.md']
copyRootFiles?: string[]

files to copy from the workspace root directory to the package build directory

['LICENSE']
dryRun?: boolean

whether to run deno publish --dry-run after generating the workspace to make sure everything is ok

true
exclude?: string[]

globs to exclude from publishing

finalize?: (ctx: BuildHookContext) => MaybePromise<void>

hook to run after the build is done, time to do any final modifications to the package contents

finalizeDenoJson?: (ctx: BuildHookContext, jsr: any) => void

hook to run after the deno.json file is generated but before it is written to disk

includePackage?: (pkg: WorkspacePackage) => boolean

custom predicate for including packages

outputDir?: string

jsr build output dir (relative to workspace root)

"dist"
sourceDir?: string

source dir (relative to package root) anything outside this dir will be copied as-is

"" (i.e. the package root itself)
transformAst?: (ast: SourceFile) => boolean

hook that will be run on each file as it is being processed, allowing you to change ast as you wish

transformCode?: (path: string, code: string) => string

similar to transformAst, but for the code itself (runs after transformAst)