Skip to content

Commit

Permalink
⬆️ electron@1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
s-a committed May 13, 2016
1 parent ce7f72a commit f7aa678
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .iron-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ var settings = {
"app": {
"native+" : true, // DEFAULT=FALSE; extends require to search native modules respecting the current v8 engine version.
"autoAddWorkSpace" : false, // DEFAULT=TRUE; disables the autoAddWorkSpace behavior.
"openDevToolsDetached" : false, // DEFAULT=FALSE; opens the dev tools windows detached in an own window.
"hideMainWindow" : false, // DEFAULT=FALSE; hides the main window to show dev tools only.
"openDevToolsDetached" : true, // DEFAULT=FALSE; opens the dev tools windows detached in an own window.
"hideMainWindow" : true, // DEFAULT=FALSE; hides the main window to show dev tools only.
},
"workSpaceDirectory" : function(argv) { // determines the workspace directory for specific commandline applications.
var result = "";
Expand Down
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{

"esversion": 6,
"passfail" : false,
"maxerr" : 100,
"browser" : true,
Expand Down
4 changes: 2 additions & 2 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
var os = require('os');
var fs = require('fs');
var path = require('path');
var remote = require('remote');
var remote = require('electron').remote;
var markdown = require('markdown').markdown;
var packageController = require("package.js");
var app = remote.require("app");
var app = require('electron').remote.app
var shell = require('electron').shell;
var PrettyError = require('pretty-error');
var prettyError = new PrettyError();
Expand Down
2 changes: 1 addition & 1 deletion app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var app;
try{
app = require("app");
} catch(e){
app = require("remote").require("app");
app = require('electron');
}

var Config = function(argv) {
Expand Down
25 changes: 10 additions & 15 deletions app/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var app = require('app'); // Module to control application life.
const {app} = require('electron');
var path = require('path'); // Module to control application life.
var BrowserWindow = require('browser-window'); // Module to create native browser window.
var Mnu = require('./menu.js');
const {BrowserWindow} = require('electron');
var Mnu = require(path.join(__dirname, 'menu.js'));
var fs = require('fs');


Expand Down Expand Up @@ -87,27 +87,22 @@ app.on('ready', function() {
mainWindow.maximize();


mainWindow.on('closed', function() {
mainWindow.webContents.on('closed', function() {
mainWindow = null;
});

var devtoolsClosedFirstCall = true; // workaround - devtools-closed fired once devTools was opened?
mainWindow.on('devtools-closed', function() {
if (config.settings.app.hideMainWindow){
if (!devtoolsClosedFirstCall){
mainWindow.close();
}
}
devtoolsClosedFirstCall = false;
mainWindow.webContents.on('devtools-closed', function() {
//app.quit();
mainWindow.show();
});

mainWindow.on('devtools-opened', function() {
setTimeout(function(){
mainWindow.webContents.on('devtools-opened', function() {
//setTimeout(function(){
mainWindow.loadURL('file://' + __dirname + '/index.html');
if (config.settings.app.hideMainWindow){
mainWindow.hide();
}
}, 400);
//}, 400);
});

mainWindow.openDevTools({detach : config.settings.app.openDevToolsDetached});
Expand Down
5 changes: 3 additions & 2 deletions app/menu.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
var os = require('os');
var Menu = require('menu');
var remote = require('electron');
const {Menu} = remote;
var template = [];
var SoftwareUpdate = require('./update.js');
var app = require("app");
const {app} = require('electron');
var path = require("path");
var fs = require("fs");
var shell = require('electron').shell;
Expand Down
3 changes: 1 addition & 2 deletions app/update.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var dialog = require('dialog');

const {dialog} = require('electron');
var execute = function(cmd, done) {
var exec = require('child_process').exec;
exec(cmd,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iron-node",
"version": "2.2.17",
"version": "3.0.0",
"description": "Debug Node.js code on the fly with Chrome Developer Tools on Linux, Windows and OS X.",
"main": "index.js",
"bin": {
Expand Down Expand Up @@ -43,7 +43,7 @@
"dependencies": {
"commander": "^2.9.0",
"deep-extend": "^0.4.1",
"electron-prebuilt": "^0.37.8",
"electron-prebuilt": "^1.0.2",
"electron-recompile": "^1.0.16",
"markdown": "^0.5.0",
"nmp": "^1.0.3",
Expand Down

0 comments on commit f7aa678

Please sign in to comment.