Skip to content
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.

🚀 [DEPRECATED] Yet another opinionated setup for Electron application

License

Notifications You must be signed in to change notification settings

preco21/electron-playgrounds

Repository files navigation

Electron Playgrounds

Code Style Prev

🚀 Yet another opinionated setup for Electron application

  • Core setup from the original playgrounds.
  • Clean and minimal setup to build React based Electron app with webpack and next.js.
  • Live-reloading (hot) works on both main and renderer processes.
  • Package executable app via electron-builder.

Install

$ git clone https://github.com/preco21/electron-playgrounds.git

$ cd electron-playgrounds
$ npm install

Prerequisite: Node.js 8 or higher.

Note: If you are on Windows Subsystem for Linux, make sure you have set the proper environment variable before installing to let electron to use right binary for the platform: npm_config_platform=win32.

Usage

Development

This command will run internal script to provide live-reloading for main process. After that, main process will run electron-next to serve renderer process.

$ npm run dev

When the dev server has started, you can start editing components in pages folder. Also you can edit index.js for main process. Any changes made within main and src folder will trigger live-reload automatically.

Build

This command will bundle the sources to app folder with webpack and next.js.

$ npm run build

After building, you will be able to run app as a standalone on the fly:

$ npm start

Package

This command will package app with electron-builder and this will generate the executable binaries in build folder:

$ npm run package

This executable binaries is available to run without any runtime dependencies.

Clean

This command will remove any content inside the output directory which made by build command.

$ npm run clean

License

MIT

About

🚀 [DEPRECATED] Yet another opinionated setup for Electron application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published