Skip to content

Commit

Permalink
feat(docz-core): add config as parameter for onPrebuild and onPostBuild
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Sep 7, 2018
1 parent 0c344d8 commit 98692bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/docz-core/src/Plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export type ModifyBundlerConfig<C = any> = (
export type ModifyBabelRC = (babelrc: BabelRC, args: Config) => BabelRC
export type onCreateApp = <A>(app: A) => void
export type OnServerListening = <S>(server: S) => void
export type OnPreBuild = () => void
export type OnPostBuild = () => void
export type OnPreBuild = (args: Config) => void
export type OnPostBuild = (args: Config) => void
export type OnPreRender = () => void
export type OnPostRender = () => void

Expand Down
4 changes: 2 additions & 2 deletions packages/docz-core/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export const build = async (args: Config) => {
await Entries.writeApp(config)
await dataServer.init()

await run('onPreBuild')
await run('onPreBuild', config)
await bundler.build(await bundler.getConfig(env))
await run('onPostBuild')
await run('onPostBuild', config)
} catch (err) {
logger.fatal(err)
process.exit(1)
Expand Down

0 comments on commit 98692bb

Please sign in to comment.