Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 98692bb

Browse files
committed
feat(docz-core): add config as parameter for onPrebuild and onPostBuild
1 parent 0c344d8 commit 98692bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/docz-core/src/Plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export type ModifyBundlerConfig<C = any> = (
1313
export type ModifyBabelRC = (babelrc: BabelRC, args: Config) => BabelRC
1414
export type onCreateApp = <A>(app: A) => void
1515
export type OnServerListening = <S>(server: S) => void
16-
export type OnPreBuild = () => void
17-
export type OnPostBuild = () => void
16+
export type OnPreBuild = (args: Config) => void
17+
export type OnPostBuild = (args: Config) => void
1818
export type OnPreRender = () => void
1919
export type OnPostRender = () => void
2020

packages/docz-core/src/commands/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export const build = async (args: Config) => {
2222
await Entries.writeApp(config)
2323
await dataServer.init()
2424

25-
await run('onPreBuild')
25+
await run('onPreBuild', config)
2626
await bundler.build(await bundler.getConfig(env))
27-
await run('onPostBuild')
27+
await run('onPostBuild', config)
2828
} catch (err) {
2929
logger.fatal(err)
3030
process.exit(1)

0 commit comments

Comments
 (0)