// By doing so, we won't mess up with `require` keyword
window.requireNode = window.require;
window.require = undefined;

var gui = requireNode('nw.gui');
var win = gui.Window.get();

window.addEventListener('shrink-window', function() {
  win.minimize();
});

window.addEventListener('enlarge-window', function() {
  win.maximize();
});

window.addEventListener('close-window', function() {
  win.close();
});

window.addEventListener('show-devtools', function() {
  win.showDevTools(); 
});

@@ -89,36 +89,8 @@
 ire;
-%0Awindow.require = undefined;
 %0A%0Ava
@@ -454,12 +454,184 @@
 ols(); %0A%7D);%0A
+%0A// Auto-reload nwjs%0Avar gulp = requireNode('gulp');%0A%0Agulp.task('reload', function() %7B%0A  if (location) %7B%0A    location.reload();%0A  %7D%0A%7D);%0A%0Agulp.watch('**/*.js', %5B'reload'%5D);%0A

add auto-reload for nwjs