Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/abdul-elah-js/react-electron-app

Create Basic React Electron App
https://github.com/abdul-elah-js/react-electron-app

create-react-app create-react-electron-app electron electron-app react react-electron react-electron-app react-js

Last synced: 5 days ago
JSON representation

Create Basic React Electron App

Awesome Lists containing this project

README

        

# React Electron App
Create React Electron App Ready Configured For Production Build

This package creates **React+Electron App** using the famous [create-react-app](https://github.com/facebook/create-react-app#readme)
library and following the additional steps taken from [this blog](https://medium.com/@kitze/%EF%B8%8F-from-react-to-an-electron-app-ready-for-production-a0468ecb1da3)

## Prerequisite

To use this package you need to install [yarn](https://yarnpkg.com/en/)

you can install yarn by simply running

```bash
npm install yarn -g
```

## Install
To Install The Package Simply Run:
```bash
npm install react-electron-app -g
```

## Usage

After installing the package simply run

```bash
react-electron-app new
```

## Running the Project

to start the electron browser in development mode simply type

```bash
npm run electron-dev
```

to pack the electron app simply type

```bash
npm run electron-pack
```

by default this package will build the app for Mac OS, Linux and Windows. You can specify one of them by editing the `package.json`
file

```json
"electron-pack": "build -c.extraMetadata.main=build/electron.js -mlw",
```
change the `-mlw` to the OS's you want to build the electron app for.
* -m : Mac OS
* -l : Linux
* -w : Windows

The packaged app will be generated in the `dist/` directory.

## License

[MIT](https://choosealicense.com/licenses/mit/)