-
Notifications
You must be signed in to change notification settings - Fork 179
Open
Description
Electron Packager has modified the definition of HookFunction by this commit. But the code below is still using the old syntax.
Lines 100 to 121 in 76b4600
| ### How can I integrate this into [Electron Packager](https://github.com/electron/packager)? | |
| electron-rebuild provides a function compatible with the [`afterCopy` hook](https://electron.github.io/packager/main/interfaces/Options.html#afterCopy) | |
| for Electron Packager. For example: | |
| ```javascript | |
| import packager from "@electron/packager"; | |
| import { rebuild } from "@electron/rebuild"; | |
| packager({ | |
| // … other options | |
| afterCopy: [ | |
| (buildPath, electronVersion, platform, arch, callback) => { | |
| rebuild({ buildPath, electronVersion, arch }) | |
| .then(() => callback()) | |
| .catch((error) => callback(error)); | |
| }, | |
| ], | |
| // … other options | |
| }); | |
| ``` |
The current definition of HookFunction can be viewed here.
What's more, the domain of the link pointing to "afterCopy hook" is electron.github.io, its documentation is outdated. I can't find the corresponding repository for that website, nor do I know who maintains it. I think the API documentation for Electron Packager and Electron Rebuild is at the domain packages.electronjs.org. 🤔
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels