Taken from electron-jsx-babel-boilerplate

This is a sample repository of Electron application.

This boilerplate includes the following build tasks:

  • Transpillation React JSX and ES6 style JavaScript files with Babel
  • Compilation scss files
  • Livereload when you change source files
  • Packaging distribution apllicatoins for each platforms(win32, darwin, linux)

Install

Clone this repository, so execute the following command.

cd electron-jsx-bash-boilerplate
npm install -g bower gulp
npm install

Run application

With file watch and livereload

gulp serve

Pre-packaging app

gulp build;electron dist

Package application

gulp package

Directory structure

+ .serve/              Compiled files
+ dist/                Application for distribution
- release/             Packaged applications for platforms
 |+ darwin/            
 |+ linux/             
 |+ win32/             
- src/                 Source directory
 |- assets/            
  |+ images/           
 |- browser/           For browser process scripts
  |+ menu/             
 |- renderer/          For renderer process scripts and resources
  |+ components/       React components
  |  bootstrap.js      Entry point for render process
  |  index.html        
 |- styles/            SCSS directory
  |  main.scss         
 |  app.js             Entry point for browser process
  bower.json           
  gulpfile.js          
  package.json