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

docs: explain how to test local code changes with symlinks #3089

Merged
merged 1 commit into from Nov 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 27 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -36,6 +36,33 @@ in the issue tracker to denote fairly-well-scoped-out bugs or feature requests t
can pick up and work on. If any of those labeled issues do not have enough information, please feel
free to ask constructive questions. (This applies to any open issue.)

## Running Forge locally

The easiest way to test changes to Forge during development is by symlinking your local packages
to a sample Forge project.

To create symlinks your local Forge packages, use the `yarn link:prepare` command after
building Forge.

```sh
yarn build
yarn link:prepare
```

Then, you want to initialize a new project with the `electron-forge init` command (which is the
underlying CLI command for `create-electron-app`). To use the symlinks you created in the last step,
pass in the `LINK_FORGE_DEPENDENCIES_ON_INIT` environment variable.

You can choose to run this command via your local build as shown below or run the production init
for versions 6.0.1 and up.

```sh
LINK_FORGE_DEPENDENCIES_ON_INIT=1 node path/to/forge/packages/api/cli/dist/electron-forge-init.js my-app
```

Forge commands executed in your `my-app` sample project should reflect any changes in your local
Forge build. (Make sure to run `yarn build:fast` or `yarn build` between code changes.)

## Documentation changes

When changing the API documentation, here are some rules to keep in mind.
Expand Down