-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add initial project structure with configuration files and exam…
…ple content
- Loading branch information
Showing
156 changed files
with
34,395 additions
and
3,379 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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* |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 80, | ||
"proseWrap": "always" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.