Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 752 Bytes

7-refresh.md

File metadata and controls

38 lines (30 loc) · 752 Bytes

Step One: Create a gulpfile.js in your repository:

'use strict';

var gulp = require('gulp');
var electron = require('electron-connect').server.create();

gulp.task('serve', function () {

 // Start browser process
 electron.start();

 // Restart browser process
 gulp.watch('app.js', electron.restart);

 // Reload renderer process
 gulp.watch(['index.js', 'index.html'], electron.reload);
});

Step Two: On line 10 of the index.html, insert the following:

require('electron-connect').client.create()

Step Three: In your CLI, type:

npm install electron-connect --save-dev
npm install -g gulp

Step Four: Begin the process by typing:

gulp serve