Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { app, BrowserWindow } from 'electron';
import is from 'electron-is';
import { join } from 'path';
import log from 'electron-log';
import * as application from './services/application';
import * as window from './services/window';
import * as menu from './services/menu';
import * as config from './configs/config';
log.transports.file.level = 'info';
log.info('(main/index) >>>>>>>>>>>>>>>>>>');
log.info('(main/index) app start');
log.info(`(main/index) log file at ${log.findLogPath()}`);
if (is.dev()) {
require('electron-debug')(); // eslint-disable-line global-require
}
app.on('ready', () => {
log.info('(main/index) app ready');
application.init();
menu.init();
// 加载 devtools extension
if (is.dev()) {
BrowserWindow.addDevToolsExtension(
join($dirname, '../../extensions/redux-devtools/2.11.1_0'),
);
BrowserWindow.addDevToolsExtension(
import { app, BrowserWindow } from 'electron';
import is from 'electron-is';
import { join } from 'path';
import log from 'electron-log';
import * as application from './services/application';
import * as window from './services/window';
import * as menu from './services/menu';
import * as davAst from './services/dva-ast';
import * as config from './configs/config';
log.info('(main/index) >>>>>>>>>>>>>>>>>>');
log.info('(main/index) app start');
log.info(`(main/index) log file at ${log.findLogPath()}`);
app.on('ready', () => {
log.info('(main/index) app ready');
application.init();
menu.init();
davAst.init();
// 加载 devtools extension
if (is.dev()) {
BrowserWindow.addDevToolsExtension(
join($dirname, '../../extensions/redux-devtools/2.11.1_0'),
);
BrowserWindow.addDevToolsExtension(
join($dirname, '../../extensions/react-developer-tools/0.15.4_0'),
);
}