diff --git a/app/index.js b/app/index.js index 8fb8d53..a7aafbf 100644 --- a/app/index.js +++ b/app/index.js @@ -3,6 +3,22 @@ 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'); + +/* + + var lingeringLine = ""; + + process.stdin.on('data', function(chunk) { + console.log("data", chunk); + lingeringLine += chunk; + }); + + process.stdin.on('end', function() { + console.log("+", lingeringLine); + }); + +*/ + // Report crashes to our server. //require('crash-reporter').start(); @@ -80,7 +96,6 @@ app.on('ready', function() { menu.init(mainWindow); mainWindow.maximize(); - mainWindow.openDevTools({detach : config.settings.app.openDevToolsDetached}); mainWindow.on('closed', function() { @@ -104,5 +119,6 @@ app.on('ready', function() { } }); + mainWindow.openDevTools({detach : config.settings.app.openDevToolsDetached}); } }); \ No newline at end of file diff --git a/bin/run.js b/bin/run.js index e0b8f76..cdd93f4 100755 --- a/bin/run.js +++ b/bin/run.js @@ -10,6 +10,26 @@ for (var i = 2; i < process.argv.length; i++) { args.push(arg); } +/* + var lingeringLine = ""; + process.stdin.on('data', function(chunk) { + console.log("data", chunk); + lingeringLine += chunk; + }); + + process.stdin.on('end', function() { + console.log("-", lingeringLine); + }); + +*/ // spawn electron -proc.spawn(electron, args); \ No newline at end of file +var _process = proc.spawn(electron, args/*, { + stdio: [ process.stdin, process.stdout, process.stderr], + cwd: process.cwd, + env: process.env +}*/); + +_process.on('close', function (code) { + process.exit(code); +}); \ No newline at end of file diff --git a/package.json b/package.json index 117581e..13597d9 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "changelog": "changelog -m", "dev": "node_modules/.bin/electron ./app", "node-sass-test": "node_modules/.bin/electron ./app ..\\require\\node-sass.js", + "pipe-test": "echo \"var i = 0; debugger;\" | node bin/run.js", "edge-test": "node_modules/.bin/electron ./app ..\\require\\edge.js", "mocha-debug": "node_modules/.bin/electron ./app node_modules/mocha/bin/_mocha", "test-notify": "node_modules/.bin/electron ./app ..\\require\\notify.js",