raoul2000 / electron-react-app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Electron React Boilerplate

This is a demo Electron + React App. No create-react-app needed, just simple setup for Webpack + Babel. You need to use git bash for the npm run clean script.

Features

  • electron (+devtron)
  • electron builder
  • React (+react dev tool)
  • webpack + babel
  • eslint
  • npm

To Use

To clone and run this repository you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:

# Clone this repository
git clone https://github.com/raoul2000/electron-react-app.git

# Go into the repository
cd electron-react-app

# Install dependencies
npm install

Run in Desktop mode

Launching in desktop mode is a two steps operation:

# step 1:  run webpack dev server
npm run dev-server

# step 2:when *dev server* is up, open a new console and start electron:
npm start

Run in Server mode

To start the server mode:

$ npm run server

Then open your browser at http://localhost:3000/app/

Test

To run unit tests :

$ npm test

Build

You can also build a distribuable package :

# build  the react app
npm run build

# build the executable 
npm run electron-build

By default, the executable is built for windows platform.

License

CC0 1.0 (Public Domain)

About

License:Creative Commons Zero v1.0 Universal


Languages

Language:JavaScript 98.0%Language:HTML 1.0%Language:CSS 1.0%