Skip to content

paulsevere/react-electron-scripts

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published