Add CLI command to call a forge hook directly
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 641
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 30
Description
### Preflight Checklist
* [X] I have read the [contribution documentation](https://github.com/electron-userland/electron-forge/blob/master/CONTRIBUTING.md) for this project.
* [X] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project follows, as appropriate.
* [X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
### Problem Description
Trying to debug / initialize application, using the `generateAssets` hook.
### Proposed Solution
Being able to call a specific hook event from the CLI would be really helpful when building static assets that are needed for running electron but not necessarily requiring a full build.
Example; the generateAssets function is used to build the separate webapp project that then gets copied into the local folder and bundled with electron. This is needed to run the Electron project, but there is no way to run this hook directly. Being able to run just the generateAssets hook as an npm script post-install would be a timesaver.
Something like `electron-forge hook generateAssets`
### Alternatives Considered
Exporting the generateAssets code into a separate js file that can be run directly from `npm run`
### Additional Information
Being able to run specific hooks directly, outside of the full build process could also be helpful when debugging those hook functions.
Contributor guide
Assessment
This issue has not been assessed yet.