electron-react
electron-react copied to clipboard
A simple and compact boilerplate for electron and react (redux, router)
ElectronJS + ReactJS boilerplate
A simple and clean boilerplate for Electron and react. It includes:
- State management with Redux
- Routing with React-Router v4
- React and Redux devtools for debugging
- .eslint for ESlint
- Webpack 3 for bundling
- Babel for compiling
Usage
NodeJS v8.3.0
- Clone the repo
git clone https://github.com/tahnik/electron-react.git - Edit the package.json to change the
nameto your project name anddescriptionto your project description. Change theauthoras well. - Run
npm i - Then run the project as described in the section below
How to
-
To run in development mode with hot reloading, open a terminal inside your project and run
npm run devThis commands creates a webpack dev server which will watch and reload the bundle as you edit and will it available at https://localhost:8080. The command will also run the electron app in development mode. So it will open up devtools with React and Redux devtools initialized.
-
To build the app and test if it is working:
npm startThis command will compile the app in production mode and start the app. Here is you still toggle the developer tools from the menu and see if there is any errors
-
To package the app and create a distributable:
npm run distThis will create a relevant distributable file. For example, if you are on Windows, it will create a .exe file in the release folder.
Contribute
Awesome! Create a new issue or do a pull request.