electron-relaunch
v0.0.1
Published
Simplest way to relaunch an electron app on file changes!
Downloads
8
Maintainers
Readme
electron relaunch
Disclaimer: this module is in its very early stages and the logic is still not mature enough.
Installation
npm install electron-relaunch
Usage
Just initialize this module with desired glob or file path to watch and let it refresh electron browser windows as targets are changed:
'use strict';
const {app, BrowserWindow} = require('electron');
require('electron-relaunch')(__dirname);
// Standard stuff
app.on('ready', () {
let mainWindow = new BrowserWindow({width: 800, height: 600});
mainWindow.loadUrl(`file://${__dirname}/index.html`);
// the rest...
});