mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-09-28 04:19:01 +00:00
Fix 'Unable to load preload script' (fix #934)
No reason to use loglevel in the *app*. It makes sense in the CLI, but in the app console.{info,log,...} is totally fine.
This commit is contained in:
parent
fafaead442
commit
4fbc3f7503
@ -16,7 +16,6 @@
|
|||||||
"electron-dl": "3.x",
|
"electron-dl": "3.x",
|
||||||
"electron-squirrel-startup": "1.x",
|
"electron-squirrel-startup": "1.x",
|
||||||
"electron-window-state": "5.x",
|
"electron-window-state": "5.x",
|
||||||
"loglevel": "1.x",
|
|
||||||
"source-map-support": "0.x",
|
"source-map-support": "0.x",
|
||||||
"wurl": "2.x"
|
"wurl": "2.x"
|
||||||
},
|
},
|
||||||
|
@ -3,7 +3,6 @@ import * as os from 'os';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import { BrowserWindow } from 'electron';
|
import { BrowserWindow } from 'electron';
|
||||||
import * as log from 'loglevel';
|
|
||||||
import wurl from 'wurl';
|
import wurl from 'wurl';
|
||||||
|
|
||||||
const INJECT_CSS_PATH = path.join(__dirname, '..', 'inject/inject.css');
|
const INJECT_CSS_PATH = path.join(__dirname, '..', 'inject/inject.css');
|
||||||
@ -60,7 +59,7 @@ export function debugLog(browserWindow: BrowserWindow, message: string): void {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
browserWindow.webContents.send('debug', message);
|
browserWindow.webContents.send('debug', message);
|
||||||
}, 3000);
|
}, 3000);
|
||||||
log.info(message);
|
console.info(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAppIcon(): string {
|
export function getAppIcon(): string {
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import * as log from 'loglevel';
|
|
||||||
|
|
||||||
import { isOSX, isWindows, isLinux } from './helpers';
|
import { isOSX, isWindows, isLinux } from './helpers';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,6 +82,6 @@ export function inferFlashPath() {
|
|||||||
return findFlashOnLinux();
|
return findFlashOnLinux();
|
||||||
}
|
}
|
||||||
|
|
||||||
log.warn('Unable to determine OS to infer flash player');
|
console.warn('Unable to determine OS to infer flash player');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@ import * as fs from 'fs';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import { ipcRenderer } from 'electron';
|
import { ipcRenderer } from 'electron';
|
||||||
import * as log from 'loglevel';
|
|
||||||
|
|
||||||
const INJECT_JS_PATH = path.join(__dirname, '..', 'inject/inject.js');
|
const INJECT_JS_PATH = path.join(__dirname, '..', 'inject/inject.js');
|
||||||
/**
|
/**
|
||||||
@ -58,9 +57,9 @@ setNotificationCallback(notifyNotificationCreate, notifyNotificationClick);
|
|||||||
|
|
||||||
ipcRenderer.on('params', (event, message) => {
|
ipcRenderer.on('params', (event, message) => {
|
||||||
const appArgs = JSON.parse(message);
|
const appArgs = JSON.parse(message);
|
||||||
log.info('nativefier.json', appArgs);
|
console.info('nativefier.json', appArgs);
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcRenderer.on('debug', (event, message) => {
|
ipcRenderer.on('debug', (event, message) => {
|
||||||
log.info('debug:', message);
|
console.info('debug:', message);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user