mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
tweaking and cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
82886db092
commit
1ff105bcfc
@ -43,14 +43,14 @@ function createWindow() {
|
|||||||
|
|
||||||
// and load the index.html of the app.
|
// and load the index.html of the app.
|
||||||
win.loadURL(url.format({
|
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'),
|
pathname: path.join(__dirname, 'electron.html'),
|
||||||
protocol: 'file:',
|
protocol: 'file:',
|
||||||
slashes: true
|
slashes: true
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// Open the DevTools.
|
// Open the DevTools.
|
||||||
win.webContents.openDevTools()
|
//win.webContents.openDevTools()
|
||||||
|
|
||||||
// Emitted when the window is closed.
|
// Emitted when the window is closed.
|
||||||
win.on('closed', () => {
|
win.on('closed', () => {
|
||||||
|
|||||||
@ -85,7 +85,7 @@ if(window.require && window.nw){
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
require('./cfg/requirejs')
|
require('./cfg/requirejs')
|
||||||
requirejs('./ui')
|
requirejs('ui')
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -10,8 +10,14 @@
|
|||||||
|
|
||||||
require('./cfg/requirejs')
|
require('./cfg/requirejs')
|
||||||
|
|
||||||
var _require = require
|
nodeRequire =
|
||||||
require = requirejs
|
global.nodeRequire =
|
||||||
|
require
|
||||||
|
|
||||||
|
require =
|
||||||
|
requirejs =
|
||||||
|
global.requirejs =
|
||||||
|
require('requirejs')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -19,12 +19,6 @@ if((typeof(process) != 'undefined' ? process : {}).__nwjs){
|
|||||||
// Setup requirejs if we are in node/nw...
|
// Setup requirejs if we are in node/nw...
|
||||||
//
|
//
|
||||||
// NOTE: no need to do this in browser...
|
// 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'){
|
if(typeof(process) != 'undefined'){
|
||||||
requirejs =
|
requirejs =
|
||||||
global.requirejs =
|
global.requirejs =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user