Add-on Structure
Last updated
Last updated
Add-ons extend Local in one of two ways:
Events that are registered with the Local UI are added to the "Renderer" entry point.
Events that don't register with the Local UI are added to the "Main" entry point.
The renderer process is what runs inside Local's main window. This is where you'll add buttons, forms, and any other user interface elements.
Most Add-ons will exclusively use the renderer process entry point for the sake of simplicity.
To use this entry point, ensure that a renderer
property is defined within the package.json
file, which points to the compiled Javascript file.
Local passes a context
object to the exported function, which allows you to leverage existing tools that are already shipped with Local.
The main process allows you to register and hook into Local functionality that doesn't rely on the Local UI. By tapping into the main process, you can run processes even when the window is closed but Local is still running.
To use this entry point, ensure that a main
property is defined within the packge.json
file, which points to the compiled Javascript file.
Local passes a context
object to the exported function, which allows you to leverage existing tools that are already shipped with Local.