Skip to content

Commit

Permalink
fix: outputFolder is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ext committed Nov 4, 2024
1 parent e4ad918 commit 53dde23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions etc/index.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ export interface GeneratorOptions {
title?: Record<string, string>;
};
};
// (undocumented)
outputFolder: string;
outputFolder?: string;
processors?: Processor[];
setupPath: string;
site: GeneratorSiteOptions;
Expand Down
7 changes: 4 additions & 3 deletions src/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export interface GeneratorOptions {
/** Site options */
site: GeneratorSiteOptions;

outputFolder: string;
/** Output folder. Default: `public` */
outputFolder?: string;

/** Where cached content is stored. Default: `temp/docs` */
cacheFolder?: string;
Expand Down Expand Up @@ -299,9 +300,9 @@ export class Generator {
}

this.site = options.site;
this.outputFolder = options.outputFolder;
this.outputFolder = options.outputFolder ?? "./public";
this.cacheFolder = options.cacheFolder ?? "./temp/docs";
this.assetFolder = path.posix.join(options.outputFolder, "assets");
this.assetFolder = path.posix.join(this.outputFolder, "assets");
this.exampleFolders = options.exampleFolders ?? [];
this.templateFolders = options.templateFolders ?? [];
this.processors = options.processors ?? [];
Expand Down

0 comments on commit 53dde23

Please sign in to comment.