⚠️ You are looking at the english version of the page. Help us translate it here.

API: The Generator Class


We can register hooks on certain life cycle events.

Hook Arguments When
generate:before (generator, generateOptions) Hook on before generation
generate:distRemoved (generator) Hook on destination folder cleaned
generate:distCopied (generator) Hook on copy static and built files
generate:page ({route, path, html}) Hook to let user update the path & html
generate:routeCreated ({route, path, errors}) Hook on saving generated page success
generate:extendRoutes (routes) Hook to let user update the routes to generate
generate:routeFailed (route, errors) Hook on saving generated page failure
generate:done (generator, errors) Hook on generation finished

잘못된 부분이 있거나 이 문서에 기여하고 싶으신가요? GitHub에서 이 페이지를 수정해주세요!

Platinum Sponsors

Storyblok Support Us