Skip to content

Migrate to docusaurus #176

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

Draft
wants to merge 7 commits into
base: v6
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
resolved broken links
  • Loading branch information
viralgupta committed May 5, 2024
commit 05cfaa339372798d7510dc259f4224a856e7d4ce
18 changes: 9 additions & 9 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

## Configuration <a href="#config" id="config"></a>

* [Overview](config/configuration.md)
* [Overview](config/configuration.mdx)
* [Plugins](config/plugins/README.md)
* [Webpack Plugin](config/plugins/webpack.md)
* [Vite Plugin](config/plugins/vite.md)
* [Webpack Plugin](config/plugins/webpack.mdx)
* [Vite Plugin](config/plugins/vite.mdx)
* [Electronegativity Plugin](config/plugins/electronegativity.md)
* [Auto Unpack Native Modules Plugin](config/plugins/auto-unpack-natives.md)
* [Local Electron Plugin](config/plugins/local-electron.md)
* [Fuses Plugin](config/plugins/fuses.md)
* [Makers](config/makers/README.md)
* [Fuses Plugin](config/plugins/fuses.mdx)
* [Makers](config/makers/README.mdx)
* [AppX](config/makers/appx.md)
* [deb](config/makers/deb.md)
* [DMG](config/makers/dmg.md)
Expand Down Expand Up @@ -42,7 +42,7 @@

## Built-in Templates <a href="#templates" id="templates"></a>

* [Vite](templates/vite.md)
* [Vite](templates/vite.mdx)
* [Vite + TypeScript](templates/vite-+-typescript.md)
* [Webpack](templates/webpack-template.md)
* [Webpack + Typescript](templates/typescript-+-webpack-template.md)
Expand All @@ -55,9 +55,9 @@
* [Custom App Icons](guides/create-and-add-icons.md)
* [Framework Integration](guides/framework-integration/README.md)
* [Parcel](guides/framework-integration/parcel.md)
* [React](guides/framework-integration/react.md)
* [React with TypeScript](guides/framework-integration/react-with-typescript.md)
* [Vue 3](guides/framework-integration/vue-3.md)
* [React](guides/framework-integration/react.mdx)
* [React with TypeScript](guides/framework-integration/react-with-typescript.mdx)
* [Vue 3](guides/framework-integration/vue-3.mdx)
* [Developing with WSL](guides/developing-with-wsl.md)

## Advanced
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/extending-electron-forge/writing-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ An Electron Forge Plugin has to export a single class that extends our base plug

If implemented this method will be once during plugin initialization inside Forge, this method is called only once and shouldn't result in any side effects being executed. You must return an object in a similar format to `forgeConfig.hooks`. i.e. an object map between hook names and an array of hook functions.

The possible hook names and the parameters passed to the hook function you return are documented over in the [Configuration](../../config/configuration.md) section of the docs.
The possible hook names and the parameters passed to the hook function you return are documented over in the [Configuration](../../config/configuration.mdx) section of the docs.

```jsx
export default class MyPlugin extends PluginBase {
Expand Down
4 changes: 2 additions & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: How to use the command line interface (CLI) commands for Electron F

## Overview

Forge's CLI is the main way to run Electron Forge commands. It consists of a thin wrapper for its core API. Configuration for these commands is done through your [Forge configuration](config/configuration.md) object.
Forge's CLI is the main way to run Electron Forge commands. It consists of a thin wrapper for its core API. Configuration for these commands is done through your [Forge configuration](./config/configuration.mdx) object.

If you want to use the core API programmatically, see the [#programmatic-usage](cli.md#programmatic-usage "mention") section below.

Expand Down Expand Up @@ -162,7 +162,7 @@ This command will launch your app in dev mode with the `electron` binary in the

If you type `rs` (and hit enter) in the same terminal where you ran the start command, the running app will be terminated and restarted.

Forge plugins can override this command to run custom development logic. For example, the [webpack.md](config/plugins/webpack.md "mention") runs a webpack-dev-server instance to provide live reloading and HMR.
Forge plugins can override this command to run custom development logic. For example, the [webpack.md](config/plugins/webpack.mdx "mention") runs a webpack-dev-server instance to provide live reloading and HMR.

#### Options

Expand Down
2 changes: 1 addition & 1 deletion docs/config/makers/squirrel.windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can only build the Squirrel.Windows target on a Windows machine or on a Linu

## Usage

Add this module to the [makers](./) section of your [Forge configuration](../configuration.md):
Add this module to the [makers](./) section of your [Forge configuration](../configuration.mdx):

```jsx title="forge.config.js"
module.exports = {
Expand Down
4 changes: 2 additions & 2 deletions docs/config/plugins/auto-unpack-natives.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >-

# Auto Unpack Native Modules Plugin

This plugin will automatically add all native Node modules in your `node_modules` folder to the [`asar.unpack`](https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html#asar) config option in your [`packagerConfig`](../configuration.md#electron-packager-config). If your app uses native Node modules, you should probably use this to reduce loading times and disk consumption on your users' machines.
This plugin will automatically add all native Node modules in your `node_modules` folder to the [`asar.unpack`](https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html#asar) config option in your [`packagerConfig`](../configuration.mdx#electron-packager-config). If your app uses native Node modules, you should probably use this to reduce loading times and disk consumption on your users' machines.

## Installation

Expand All @@ -16,7 +16,7 @@ npm install --save-dev @electron-forge/plugin-auto-unpack-natives

## Usage

You must add this plugin to your [`plugins`](../configuration.md#plugins) array in your Forge configuration. There are currently no configuration options available for this plugin.
You must add this plugin to your [`plugins`](../configuration.mdx#plugins) array in your Forge configuration. There are currently no configuration options available for this plugin.

:::info
Asar archives are disabled by default with Electron Packager. Make sure you set your `packagerConfig.asar` value accordingly. This option also supports advanced configuration if you pass it an object. See the [API documentation for this option](https://js.electronforge.io/modules/\_electron\_forge\_shared\_types.InternalOptions.html#CreateOptions) for more information.
Expand Down
2 changes: 1 addition & 1 deletion docs/config/plugins/electronegativity.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npm install --save-dev @electron-forge/plugin-electronegativity

## Usage

Add this plugin to the [`plugins`](../configuration.md#plugins) array in your Forge configuration. All [programmatic options for Electronegativity](https://github.com/doyensec/electronegativity#programmatically), except for `input` and `electronVersion`.
Add this plugin to the [`plugins`](../configuration.mdx#plugins) array in your Forge configuration. All [programmatic options for Electronegativity](https://github.com/doyensec/electronegativity#programmatically), except for `input` and `electronVersion`.

### Example

Expand Down
2 changes: 1 addition & 1 deletion docs/config/plugins/vite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ npm install --save-dev @electron-forge/plugin-vite

You must provide two Vite configuration files: one for the main process in `vite.main.config.js`, and one for the renderer process in `vite.renderer.config.js`.

For example, this is the [configuration](../configuration.md) taken from Forge's [Vite template](../../templates/vite.md):
For example, this is the [configuration](../configuration.mdx) taken from Forge's [Vite template](../../templates/vite.md):

<Tabs
defaultValue="forge.config.js"
Expand Down
2 changes: 1 addition & 1 deletion docs/config/plugins/webpack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ npm install --save-dev @electron-forge/plugin-webpack

You must provide two webpack configuration files: one for the main process in `mainConfig`, and one for the renderer process in `renderer.config`. The complete config options are available in the API docs under [`WebpackPluginConfig`](https://js.electronforge.io/interfaces/\_electron\_forge\_plugin\_webpack.WebpackPluginConfig.html).

For example, this is the [configuration](../configuration.md) taken from Forge's [webpack template](../../templates/webpack-template.md):
For example, this is the [configuration](../configuration.mdx) taken from Forge's [webpack template](../../templates/webpack-template.md):

<Tabs
defaultValue="forge.config.js"
Expand Down
2 changes: 1 addition & 1 deletion docs/core-concepts/build-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ These hooks can be used to implement custom logic that your application needs. F
For a full list of Forge hooks and usage examples, see the [hooks.md](../config/hooks.md "mention") documentation.
:::

If you want to share a specific sequence of build hook logic, you can modularize your hook code into a **plugin** instead. This is how Forge's [webpack.md](../config/plugins/webpack.md "mention") works, for instance. For more details on authoring custom plugins, see the [writing-plugins.md](../advanced/extending-electron-forge/writing-plugins.md "mention") guide.
If you want to share a specific sequence of build hook logic, you can modularize your hook code into a **plugin** instead. This is how Forge's [webpack.md](../config/plugins/webpack.mdx "mention") works, for instance. For more details on authoring custom plugins, see the [writing-plugins.md](../advanced/extending-electron-forge/writing-plugins.md "mention") guide.

## Cross-platform build systems

Expand Down
2 changes: 1 addition & 1 deletion docs/import-existing-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To start using Forge, add a few command scripts to your package.json file:
```


Then, set up your Forge [configuration.md](config/configuration.md "mention") in the `config.forge` field in package.json.
Then, set up your Forge [configuration.md](config/configuration.mdx "mention") in the `config.forge` field in package.json.

```json title="package.json"
{
Expand Down
4 changes: 2 additions & 2 deletions docs/templates/typescript-+-webpack-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Create a new Electron app with webpack and TypeScript.

# Webpack + Typescript

To get you up and running as fast as possible with [TypeScript](https://www.typescriptlang.org/) and [webpack](https://webpack.js.org/), we provide a template that makes use of the [`@electron-forge/plugin-webpack` module](../config/plugins/webpack.md) with sane TypeScript configuration defaults.
To get you up and running as fast as possible with [TypeScript](https://www.typescriptlang.org/) and [webpack](https://webpack.js.org/), we provide a template that makes use of the [`@electron-forge/plugin-webpack` module](../config/plugins/webpack.mdx) with sane TypeScript configuration defaults.

```bash
npm init electron-app@latest my-new-app -- --template=webpack-typescript
Expand All @@ -14,4 +14,4 @@ npm init electron-app@latest my-new-app -- --template=webpack-typescript
There have been reports that using the Git Bash command line on Windows specifically with this template will prevent the Electron app from rendering (packaged apps are fine). We recommend that on Windows, you use CMD.exe, PowerShell, or [WSL2](../guides/developing-with-wsl.md).
:::

Once you've initialized the template, you'll need to run `npm start` in the generated directory. See the [Webpack Plugin](../config/plugins/webpack.md) documentation for Electron Forge-specific configuration options.
Once you've initialized the template, you'll need to run `npm start` in the generated directory. See the [Webpack Plugin](../config/plugins/webpack.mdx) documentation for Electron Forge-specific configuration options.
4 changes: 2 additions & 2 deletions docs/templates/vite-+-typescript.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Vite + TypeScript

To get you up and running as fast as possible with [TypeScript](https://www.typescriptlang.org/) and [Vite](https://vitejs.dev/), we provide a template that makes use of the [`@electron-forge/plugin-vite` module](../config/plugins/vite.md) with sane TypeScript configuration defaults.
To get you up and running as fast as possible with [TypeScript](https://www.typescriptlang.org/) and [Vite](https://vitejs.dev/), we provide a template that makes use of the [`@electron-forge/plugin-vite` module](../config/plugins/vite.mdx) with sane TypeScript configuration defaults.

```bash
npm init electron-app@latest my-new-app -- --template=vite-typescript
```

Once you've initialized the template, you'll need to run `npm start` in the generated directory.

See the [Vite Plugin](../config/plugins/vite.md) documentation for Electron Forge-specific configuration options.
See the [Vite Plugin](../config/plugins/vite.mdx) documentation for Electron Forge-specific configuration options.
4 changes: 2 additions & 2 deletions docs/templates/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ description: Create a new Electron app with Vite.

# Vite

To get you up and running as fast as possible with [Vite](https://vitejs.dev/), we provide a template that makes use of the [`@electron-forge/plugin-vite` module](../config/plugins/vite.md), plus some preset Vite configuration options.
To get you up and running as fast as possible with [Vite](https://vitejs.dev/), we provide a template that makes use of the [`@electron-forge/plugin-vite` module](../config/plugins/vite.mdx), plus some preset Vite configuration options.

```bash
npm init electron-app@latest my-new-app -- --template=vite
```

Once you've initialized the template, you'll need to run `npm start` in the generated directory.

See the [Vite Plugin](../config/plugins/vite.md) documentation for Electron Forge-specific configuration options.
See the [Vite Plugin](../config/plugins/vite.mdx) documentation for Electron Forge-specific configuration options.
4 changes: 2 additions & 2 deletions docs/templates/webpack-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ description: Create a new Electron app with Webpack

# Webpack

To get you up and running as fast as possible with the [webpack](https://webpack.js.org) bundler, we provide a template that makes use of the [`@electron-forge/plugin-webpack` module](../config/plugins/webpack.md), plus some preset webpack configuration options. This is by far the quickest way to getting a working webpack setup with Electron.
To get you up and running as fast as possible with the [webpack](https://webpack.js.org) bundler, we provide a template that makes use of the [`@electron-forge/plugin-webpack` module](../config/plugins/webpack.mdx), plus some preset webpack configuration options. This is by far the quickest way to getting a working webpack setup with Electron.

```bash
npm init electron-app@latest my-new-app -- --template=webpack
```

Once you've initialized the template, you'll need to run `npm start` in the generated directory. See the [Webpack Plugin](../config/plugins/webpack.md) documentation for Electron Forge-specific configuration options.
Once you've initialized the template, you'll need to run `npm start` in the generated directory. See the [Webpack Plugin](../config/plugins/webpack.mdx) documentation for Electron Forge-specific configuration options.