From c12b9199a1e90f94439e60d2a89d109afd0b7a0a Mon Sep 17 00:00:00 2001 From: Erick Zhao Date: Sat, 8 Feb 2025 03:53:43 +0000 Subject: [PATCH] GITBOOK-195: Document `NODE_INSTALLER` environment variable --- cli.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cli.md b/cli.md index 6be5562..6cb718b 100644 --- a/cli.md +++ b/cli.md @@ -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. @@ -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. + +
NODE_INSTALLER=npm npx create-electron-app my-app-dir
+
+{% endhint %} + ### Init {% hint style="info" %} @@ -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).