react-electron-scripts

0.4.2 • Public • Published

react-scripts for electron apps

This package includes scripts and configuration used by Create React App. It is a fork of the official react-scripts package aimed at bringing the convenience of "create-react-app" to desktop app development with electron.

Repository

Use

create-react-app <my_app> --scripts-version react-electron-scripts

NOTE: This package uses a globally installed electron version (Using the electron binary from a locally installed was causing problems for some reason). If you have not yet installed electron, you will be prompted.

NOTE: running npm/yarn start will run the webpack dev server and start the electron app. Changes to the code run by the renderer process will cause a hot reload. To restart the main process, close the spawned application (you will be prompted to restart). To run the main process indepentent of the webpack dev server, run:

electron .

App source Structure

  • src/
    • Contains React app skeleton including a react component implementing the close, minimize and fullscreen buttons in a MacOS style (replacing the native buttons).
  • main_process/
    • main.js
      • Main electron process.
  • index.js
    • Kicks off main process.

TODO

  • Create scripts for building and bundling electron app.

Package Sidebar

Install

npm i react-electron-scripts

Weekly Downloads

24

Version

0.4.2

License

BSD-3-Clause

Last publish

Collaborators

  • paulsevere