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

Migrate Documentation from GitBook to Docusaurus #217

Draft
wants to merge 1 commit into
base: v6
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
Binary file removed .gitbook/assets/Untitled-2022-08-26-1442 (1).png
Binary file not shown.
Binary file removed .gitbook/assets/Untitled-2022-08-26-1442 (2).png
Binary file not shown.
Binary file removed .gitbook/assets/Untitled-2022-08-26-1442.png
Binary file not shown.
Binary file removed .gitbook/assets/image.png
Binary file not shown.
30 changes: 0 additions & 30 deletions .github/workflows/add-to-project.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/auto-fix-lint.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/lint.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
6 changes: 0 additions & 6 deletions .markdownlint.json

This file was deleted.

1 change: 0 additions & 1 deletion .markdownlintignore

This file was deleted.

7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"singleQuote": true,
"printWidth": 80,
"proseWrap": "always"
}

86 changes: 20 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,41 @@
---
description: Quickly scaffold an Electron project with a full build pipeline
---
# Website

# Getting Started
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

## Overview
### Installation

Electron Forge is an all-in-one tool for packaging and distributing Electron applications. It combines many single-purpose packages to create a full build pipeline that works out of the box, complete with code signing, installers, and artifact publishing. For advanced workflows, custom build logic can be added in the Forge lifecycle through its [Plugin API](config/plugins/). Custom build and storage targets can be handled by creating your own [Makers](config/makers/) and [Publishers](config/publishers/).

## Creating a new app

To get started with Electron Forge, we first need to initialize a new project with `create-electron-app`. This script is a convenient wrapper around Forge's [Init](cli.md#Init) command.

{% hint style="warning" %}
Electron Forge currently only supports npm and Yarn Classic. If you are using Yarn >=2, please use the `nodeLinker: node-modules` install mode.
{% endhint %}

```bash
npx create-electron-app@latest my-app
```
$ yarn
```

### Using templates

Forge's initialization scripts can add additional template code with the `--template=[template-name]` flag.
### Local Development

```bash
npx create-electron-app@latest my-app --template=webpack
```
$ yarn start
```

There are currently four first-party templates:

* `webpack`
* `webpack-typescript`
* `vite`
* `vite-typescript`
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

All of these templates are built around plugins that bundle your JavaScript code for production and includes a dev server to provide a better developer experience.
### Build

{% hint style="info" %}
We highly recommend using these templates when initializing your app to take advantage of modern front-end JavaScript tooling.
{% endhint %}
```
$ yarn build
```

To learn more about authoring your own templates for Electron Forge, check out the [Writing Templates](advanced/extending-electron-forge/writing-templates.md) guide!
This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Starting your app
### Deployment

You should now have a directory called `my-app` with all the files you need for a basic Electron app.
Using SSH:

```bash
cd my-app
npm start
```

## Building distributables

So you've got an **amazing** application there, and you want to package it all up and share it with the world. If you run the `make` script, Electron Forge will generate you platform specific distributables for you to share with everyone. For more information on what kind of distributables you can make, check out the [Makers](config/makers/) documentation.

```bash
npm run make
$ USE_SSH=true yarn deploy
```

## Publishing your app
Not using SSH:

Now you have distributables that you can share with your users. If you run the `publish` script, Electron Forge will then publish the platform-specific distributables for you, using the publishing method of your choice. For example, if you want to publish your assets to GitHub, you can install the GitHub publisher dependency using:

```bash
npm install --save-dev @electron-forge/publisher-github
```

Once you have [configured the publisher according to the documentation](config/publishers/github.md), run the following command to upload your distributables:

```bash
npm run publish
$ GIT_USER=<Your GitHub username> yarn deploy
```

For more information on what publishers we currently support, check out the [Publishers](config/publishers/) documentation.

## Advanced Usage

Once you've got a basic app starting, building and publishing, it's time to add your custom configuration, which can be done in the `forge.config.js` file. Configuration options are specified in the [Configuration Docs](https://www.electronforge.io/configuration).

You can also check out the documentation on some of our more advanced features like:

* [Adding plugins](config/plugins/)
* [Debugging your app](advanced/debugging.md)
* [Writing your own makers, publishers and plugins](advanced/extending-electron-forge/)
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
35 changes: 0 additions & 35 deletions advanced/auto-update.md

This file was deleted.

66 changes: 0 additions & 66 deletions advanced/debugging.md

This file was deleted.

10 changes: 0 additions & 10 deletions advanced/extending-electron-forge/README.md

This file was deleted.

Loading
Loading