Netlify/0.8.1/AddBuildEventHandler
This codemod renames addBuildHook
to addBuildEventHandler
as required in Netlify SDK v0.8.1.
Before
import { NetlifyIntegration } from '@netlify/sdk';const integration = new NetlifyIntegration();// Adding a build event handlerintegration.addBuildHook('onPreBuild', () => {console.log('This is my first build event handler!');});
After
import { NetlifyIntegration } from '@netlify/sdk';const integration = new NetlifyIntegration();// Adding a build event handlerintegration.addBuildEventHandler('onPreBuild', () => {console.log('This is my first build event handler!');});
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community