tweaking and cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-11-01 05:57:01 +03:00
parent 82886db092
commit 1ff105bcfc
4 changed files with 11 additions and 11 deletions

View File

@ -43,14 +43,14 @@ function createWindow() {
// and load the index.html of the app.
win.loadURL(url.format({
// XXX for some reason the system is loaded twice...
// XXX unify this with index.html
pathname: path.join(__dirname, 'electron.html'),
protocol: 'file:',
slashes: true
}))
// Open the DevTools.
win.webContents.openDevTools()
//win.webContents.openDevTools()
// Emitted when the window is closed.
win.on('closed', () => {

View File

@ -85,7 +85,7 @@ if(window.require && window.nw){
<script>
require('./cfg/requirejs')
requirejs('./ui')
requirejs('ui')
</script>

View File

@ -10,8 +10,14 @@
require('./cfg/requirejs')
var _require = require
require = requirejs
nodeRequire =
global.nodeRequire =
require
require =
requirejs =
global.requirejs =
require('requirejs')

View File

@ -19,12 +19,6 @@ if((typeof(process) != 'undefined' ? process : {}).__nwjs){
// Setup requirejs if we are in node/nw...
//
// NOTE: no need to do this in browser...
//
// XXX this will create a second requirejs instance with node
// compatibility...
// ...would be nice if we could avoid this...
// XXX setting nodeRequire on existing requirejs will change how
// everything is loaded...
if(typeof(process) != 'undefined'){
requirejs =
global.requirejs =