Skip to content

Commit c12b919

Browse files
erickzhaogitbook-bot
authored andcommitted
GITBOOK-195: Document NODE_INSTALLER environment variable
1 parent 2509154 commit c12b919

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

cli.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ If you want to use the core API programmatically, see the [#programmatic-usage](
1414
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.
1515
{% endhint %}
1616

17-
1817
## Installation
1918

2019
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.
@@ -27,6 +26,15 @@ npm install --save-dev @electron-forge/cli
2726

2827
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.
2928

29+
{% hint style="info" %}
30+
By default, Electron Forge will use `yarn` if it's available on your system when bootstrapping your application.\
31+
\
32+
To run Forge commands with a specific package manager, use the `NODE_INSTALLER` environment variable.
33+
34+
<pre class="language-sh"><code class="lang-sh"><strong>NODE_INSTALLER=npm npx create-electron-app my-app-dir
35+
</strong></code></pre>
36+
{% endhint %}
37+
3038
### Init
3139

3240
{% hint style="info" %}
@@ -201,4 +209,4 @@ const main = async () => {
201209
main();
202210
```
203211

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

0 commit comments

Comments
 (0)