@pkhex-everywhere/plugin-sdk
v2.0.3
Published
Types for plug-in page modules of https://pkhex-web.github.io.
Readme
@pkhex-everywhere/plugin-sdk
Types for the page modules of PKHeX.Everywhere plug-ins.
Writing a plugin · API reference
Install
npm install --save-dev @pkhex-everywhere/plugin-sdkExample
A page module exports a mount function. The app calls it with the element to render into and a PageContext.
import type { Mount } from '@pkhex-everywhere/plugin-sdk'
export const mount: Mount = (element, ctx) => {
element.textContent = `Hello from ${ctx.plugInId}`
return () => element.replaceChildren()
}License
GPL-3.0-or-later.
