Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* @import { DomStackOpts as DomStackOpts, Results, SiteData } from './lib/builder.js'
* @import { Stats } from 'node:fs'
* @import { FSWatcher } from 'chokidar'
* @import { AsyncLayoutFunction, LayoutFunction } from './lib/build-pages/page-data.js'
* @import { PageFunction, AsyncPageFunction } from './lib/build-pages/page-builders/page-writer.js'
* @import { TemplateFunction } from './lib/build-pages/page-builders/template-builder.js'
* @import { AsyncLayoutFunction, LayoutFunction, LayoutFunctionParams } from './lib/build-pages/page-data.js'
* @import { PageFunction, AsyncPageFunction, PageFunctionParams } from './lib/build-pages/page-builders/page-writer.js'
* @import { TemplateFunction, TemplateFunctionParams } from './lib/build-pages/page-builders/template-builder.js'
* @import { TemplateAsyncIterator } from './lib/build-pages/page-builders/template-builder.js'
* @import { TemplateOutputOverride } from './lib/build-pages/page-builders/template-builder.js'
* @import { GlobalDataFunction, AsyncGlobalDataFunction, WorkerBuildStepResult } from './lib/build-pages/index.js'
* @import { GlobalDataFunction, AsyncGlobalDataFunction, WorkerBuildStepResult, GlobalDataFunctionParams } from './lib/build-pages/index.js'
* @import { BuildOptions, BuildContext } from 'esbuild'
* @import { PageInfo, TemplateInfo } from './lib/identify-pages.js'
*/
Expand Down Expand Up @@ -49,6 +49,8 @@ import { resolveVars } from './lib/build-pages/resolve-vars.js'
import { ensureDest } from './lib/helpers/ensure-dest.js'
import { DomStackAggregateError } from './lib/helpers/domstack-aggregate-error.js'

export { PageData } from './lib/build-pages/page-data.js'

Comment thread
bcomnes marked this conversation as resolved.
/**
* @typedef {BuildOptions} BuildOptions
*/
Expand Down Expand Up @@ -103,6 +105,36 @@ import { DomStackAggregateError } from './lib/helpers/domstack-aggregate-error.j
* @typedef {TemplateOutputOverride} TemplateOutputOverride
*/

/**
* @typedef {PageInfo} PageInfo
*/

/**
* @typedef {TemplateInfo} TemplateInfo
*/

/**
* @template {Record<string, any>} T - The type of variables passed to the layout function
* @template [U=any] U - The return type of the page function
* @template [V=string] V - The return type of the layout function
* @typedef {LayoutFunctionParams<T, U, V>} LayoutFunctionParams
*/

/**
* @typedef {GlobalDataFunctionParams} GlobalDataFunctionParams
*/

/**
* @template {Record<string, any>} T - The type of variables passed to the page function
* @template [U=any] U - The return type of the page function
* @typedef {PageFunctionParams<T, U>} PageFunctionParams
*/
Comment thread
bcomnes marked this conversation as resolved.

/**
* @template {Record<string, any>} T - The type of variables for the template function
* @typedef {TemplateFunctionParams<T>} TemplateFunctionParams
*/
Comment thread
bcomnes marked this conversation as resolved.

const DEFAULT_IGNORES = /** @type {const} */ ([
'.*',
'coverage',
Expand Down
Loading