Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): adding register/unregisterForgeConfigForDirectory to utils #3626

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IIIMADDINIII
Copy link

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summary:

Fixes: #3510

Currently it is not possible to provide a forge config through the API of @electron-forge/core.
This makes integrating electron forge in to other build systems difficult, if these build systems want to provide the configuration for electron forge (for example by using metadata from previous build steps).

This pull request implements two functions utils.registerForgeConfigForDirectory(dir: string, config: ForgeConfig): void and unregisterForgeConfigForDirectory(dir: string): void to make this easier.
A "virtual" config registered through the first method behaves as if a forge.config.js file where present at that location exporting the object provided by the config parameter.
This takes precedence over any existing config options in an existing forge-config.js or package.json file in that directory.

This is my first contribution to this Project and i do not have a lot of experience in Open Source Development.
So If i forgot anything or i should have done something differently, please let me know.
Thank You!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant