Skip to content

Commit

Permalink
GITBOOK-195: Document NODE_INSTALLER environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao authored and gitbook-bot committed Feb 8, 2025
1 parent 2509154 commit c12b919
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ If you want to use the core API programmatically, see the [#programmatic-usage](
Forge's CLI uses comma-separated value strings to pass multiple arguments into a single flag. Depending on your terminal, these comma-separated values may need to be enclosed in quotation marks.
{% endhint %}


## Installation

To use the Forge CLI, install the `@electron-forge/cli` module into your project as a devDependency. If you're using the `create-electron-app` script, this module will already be installed for you.
Expand All @@ -27,6 +26,15 @@ npm install --save-dev @electron-forge/cli

These commands help you get started with Forge. If you're just getting started with Electron Forge, we recommend you follow the [.](./ "mention") or [import-existing-project.md](import-existing-project.md "mention") guides.

{% hint style="info" %}
By default, Electron Forge will use `yarn` if it's available on your system when bootstrapping your application.\
\
To run Forge commands with a specific package manager, use the `NODE_INSTALLER` environment variable.

<pre class="language-sh"><code class="lang-sh"><strong>NODE_INSTALLER=npm npx create-electron-app my-app-dir
</strong></code></pre>
{% endhint %}

### Init

{% hint style="info" %}
Expand Down Expand Up @@ -201,4 +209,4 @@ const main = async () => {
main();
```

For more information, see the [API documentation](https://js.electronforge.io/classes/\_electron\_forge\_core.ForgeAPI.html).
For more information, see the [API documentation](https://js.electronforge.io/classes/_electron_forge_core.ForgeAPI.html).

0 comments on commit c12b919

Please sign in to comment.