mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-01-11 01:32:04 +00:00
Cleanup app files and directories
- All source files are now in `src` and will be compiled and copied over to `lib` on `npm run build-app` - Add logging of `appArgs` in preload on startup - Use node `path` module to resolve pathnames instead of concatenating strings together
This commit is contained in:
parent
c1f844f072
commit
5c204eec77
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var os = require('os');
|
var os = require('os');
|
||||||
|
var path = require('path');
|
||||||
var electron = require('electron');
|
var electron = require('electron');
|
||||||
|
|
||||||
var wurl = require('wurl');
|
var wurl = require('wurl');
|
||||||
@ -13,9 +14,9 @@ var BrowserWindow = electron.BrowserWindow;
|
|||||||
var shell = electron.shell;
|
var shell = electron.shell;
|
||||||
var ipcMain = electron.ipcMain;
|
var ipcMain = electron.ipcMain;
|
||||||
|
|
||||||
var buildMenu = require('./buildMenu');
|
var buildMenu = require('./components/menu/menu');
|
||||||
|
|
||||||
const APP_ARGS_FILE_PATH = __dirname + '/nativefier.json';
|
const APP_ARGS_FILE_PATH = path.join(__dirname, '..', 'nativefier.json');
|
||||||
|
|
||||||
var mainWindow = null;
|
var mainWindow = null;
|
||||||
|
|
||||||
@ -57,7 +58,7 @@ app.on('ready', function () {
|
|||||||
javascript: true,
|
javascript: true,
|
||||||
plugins: true,
|
plugins: true,
|
||||||
nodeIntegration: false,
|
nodeIntegration: false,
|
||||||
preload: __dirname + '/assets/js/index.js'
|
preload: path.join(__dirname, 'preload.js')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Created by JiaHao on 5/7/15.
|
Preload file that will be executed in the renderer process
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var ipc = require('electron').ipcRenderer;
|
var ipc = require('electron').ipcRenderer;
|
||||||
@ -10,4 +10,5 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
|||||||
|
|
||||||
ipc.on('params', function (event, message) {
|
ipc.on('params', function (event, message) {
|
||||||
var appArgs = JSON.parse(message);
|
var appArgs = JSON.parse(message);
|
||||||
|
console.log('nativefier.json', appArgs);
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user