mmick66 / electrate

Quick and Easy Electron + React Boilerplace

Home Page:https://medium.com/@michael.m/creating-an-electron-and-react-template-5173d086549a

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Electrate

This is a simple Electron + React.js template (with live reload). It was designed to work without the need of a development server running in the background, like so many other templates, and it's hence free of cross domain request constraints (CORS). It's further explained in my article on Medium.

Installing

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/mmick66/electrate my-app
# Go into the repository
cd my-app
# Install dependencies
npm install

Running

npm run start

Testing

The tool of choice is Jest as used at Facebook. Create files with the extension *.test.js and they will be run through

npm run test

Packaging

Replace the icon inside the build folder and run

npm run release

Check the dist folder for the app

How Electron Works with React

This template compiles all *.js files in src into standard JS and copies it to app. There it includes *.html and *.css together with the main.js start file. From then it runs and packages using gulp as run through npm.

electron_sequence

Extending the Template

Some useful tools include:

  1. Spectron
  2. Karma + Jasmine
  3. Ant Design (a React based UI Framework)

Copyright

The template is made available through the Creative Commons Licence. The logo icon was provided by Vecteezy.

About

Quick and Easy Electron + React Boilerplace

https://medium.com/@michael.m/creating-an-electron-and-react-template-5173d086549a

License:Creative Commons Zero v1.0 Universal


Languages

Language:JavaScript 88.7%Language:HTML 7.9%Language:CSS 3.4%