A simple Electron-React app to be used as a boilerplate.
For more Electron resources, see Awesome-electron.
This boilerplate uses the following technology:
- Electron: framework for native desktop apps using web technologies
- electron-prebuilt-compile: powered by electron-compile to compile JS and CSS
- React: the UI
- Babel: a JavaScript compiler
- Semantic-UI-React: a responsive UI framework with React components
- react-devtools: an extension of Chrome's developer tools for React components. Installed using electron-devtools-installer
- cross-env: set environment scripts for running the app
- Ensure Node.js and npm are installed. If not, Node can be installed from here.
- Also make sure that Electron is installed globally
npm install -g electron
.
git clone https://github.com/sparksc/electron-compile-react.git
cd electron-compile-react
npm install
npm start
+ css/
+ release/ Packaged applications by platform
+ resources/ Project assets (images/icons, etc.)
- src/ Source directory
|+ components/ React components
App.jsx Renders the app's react components
index.html The entry point of the app
main.js Electron configuration
package.json
Note that the current configuration for Semantic-UI-React is installed via npm and includes the Semantic UI CDN link in the index.js file. To allow for custom theming with Semantic UI, the Semantic UI package would need to be installed and built with Gulp. Refer here for instructions on how to install the Semantic UI package.
apm install linter linter-js-standard-jsx react autocomplete-modules javascript-snippets
The current template uses Semantic-UI-React, but here are a few other front-end frameworks that can be used instead: