generated from avior/template-web-astro
26 lines
925 B
TypeScript
26 lines
925 B
TypeScript
import type { AstroIntegration, AstroIntegrationLogger } from 'astro'
|
|
|
|
const setup = (step: keyof AstroIntegration['hooks']) => (ctx: { logger: AstroIntegrationLogger }) => {
|
|
ctx.logger.info(step)
|
|
}
|
|
|
|
const integration: AstroIntegration = {
|
|
name: 'hooks',
|
|
hooks: {
|
|
'astro:config:setup': setup('astro:config:setup'),
|
|
'astro:config:done': setup('astro:config:done'),
|
|
'astro:server:setup': setup('astro:server:setup'),
|
|
'astro:server:start': setup('astro:server:start'),
|
|
'astro:server:done': setup('astro:server:done'),
|
|
'astro:build:start': setup('astro:build:start'),
|
|
'astro:build:setup': setup('astro:build:setup'),
|
|
'astro:build:generated': setup('astro:build:generated'),
|
|
'astro:build:ssr': setup('astro:build:ssr'),
|
|
'astro:build:done': setup('astro:build:done'),
|
|
'astro:route:setup': setup('astro:route:setup'),
|
|
'astro:route:resolved': setup('astro:route:resolved')
|
|
}
|
|
}
|
|
|
|
export default integration
|