https://github.com/michaelcurrin/electron-quickstart
Boilerplate for a simple Electron app
https://github.com/michaelcurrin/electron-quickstart
beginner boilerplate electron javascript quickstart
Last synced: about 2 months ago
JSON representation
Boilerplate for a simple Electron app
- Host: GitHub
- URL: https://github.com/michaelcurrin/electron-quickstart
- Owner: MichaelCurrin
- License: mit
- Created: 2020-08-21T21:08:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-06T12:55:31.000Z (about 5 years ago)
- Last Synced: 2025-01-14T20:53:50.553Z (over 1 year ago)
- Topics: beginner, boilerplate, electron, javascript, quickstart
- Language: HTML
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Electron.js Quickstart
> Boilerplate for a simple Electron app
[](https://snyk.io/test/github/MichaelCurrin/electron-quickstart?targetFile=package.json)
[](https://github.com/MichaelCurrin/electron-quickstart/releases/)
[](#license)
[](https://nodejs.org "Node.js homepage")
[](https://www.npmjs.com/package/electron)
## Preview
## About
Electron is a JavaScript framework which lets you write desktop applications. Such as Facebook Messenger, Slack and Visual Studio Code. This project is a template to help you learn the basics and get a Hello World project running with minimal effort.
[](https://github.com/MichaelCurrin/electron-quickstart/generate)
## Resources
See [Electron](https://michaelcurrin.github.io/dev-resources/resources/javascript/packages/electron/) in Dev Resources site.
## Create your own app from scratch
This project's contents and the steps this section are based on the intro tutorial in the docs.
- [Writing Your First Electron App](https://www.electronjs.org/docs/tutorial/first-app)
```sh
$ mkdir my-app
$ npm init
$ npm install --save-dev electron
```
Setup these files at minimum:
- `index.html`
- `main.js`
Copy the content from the tutorial or from the scripts in this repo.
Add this to the `scripts` section of `package.json` - `"start": "electron ."`.
Note that using `node main.js` will not work - the `require('electron')` import will just return a string (a path like `'.../node_modules/electron/dist/electron'`) and `app` will cause errors as it is undefined.
Run your app with:
```sh
$ npm start
```
## Installation
Install Node.js - see [instructions](https://gist.github.com/aa1fc56419a355972b96bce23f3bccba).
Clone the repo.
Install dependencies.
```sh
$ npm install
```
## Usage
```sh
$ npm start
```
## License
Released under [MIT](/LICENSE) by [@MichaelCurrin](https://github.com/MichaelCurrin).