mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-01-11 01:32:04 +00:00
Refactor to use ES6 imports for electron modules
This commit is contained in:
parent
5833347ad8
commit
a70433959b
@ -1,5 +1,4 @@
|
|||||||
import electron from 'electron';
|
import {Menu, ipcMain, shell, BrowserWindow} from 'electron';
|
||||||
const {Menu, ipcMain, shell, BrowserWindow} = electron;
|
|
||||||
|
|
||||||
function initContextMenu(mainWindow) {
|
function initContextMenu(mainWindow) {
|
||||||
ipcMain.on('contextMenuOpened', (event, targetHref) => {
|
ipcMain.on('contextMenuOpened', (event, targetHref) => {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import electron from 'electron';
|
import {BrowserWindow, ipcMain} from 'electron';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
const {BrowserWindow, ipcMain} = electron;
|
|
||||||
|
|
||||||
function createLoginWindow(loginCallback) {
|
function createLoginWindow(loginCallback) {
|
||||||
var loginWindow = new BrowserWindow({
|
var loginWindow = new BrowserWindow({
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import electron from 'electron';
|
import {BrowserWindow, shell, ipcMain, dialog} from 'electron';
|
||||||
import windowStateKeeper from 'electron-window-state';
|
import windowStateKeeper from 'electron-window-state';
|
||||||
import helpers from './../../helpers/helpers';
|
import helpers from './../../helpers/helpers';
|
||||||
import createMenu from './../menu/menu';
|
import createMenu from './../menu/menu';
|
||||||
import initContextMenu from './../contextMenu/contextMenu';
|
import initContextMenu from './../contextMenu/contextMenu';
|
||||||
|
|
||||||
const {BrowserWindow, shell, ipcMain, dialog} = electron;
|
|
||||||
const {isOSX, linkIsInternal, getCssToInject} = helpers;
|
const {isOSX, linkIsInternal, getCssToInject} = helpers;
|
||||||
|
|
||||||
const ZOOM_INTERVAL = 0.1;
|
const ZOOM_INTERVAL = 0.1;
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
import 'source-map-support/register';
|
import 'source-map-support/register';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import electron from 'electron';
|
import {app, ipcMain} from 'electron';
|
||||||
import createLoginWindow from './components/login/loginWindow';
|
import createLoginWindow from './components/login/loginWindow';
|
||||||
import createMainWindow from './components/mainWindow/mainWindow';
|
import createMainWindow from './components/mainWindow/mainWindow';
|
||||||
import helpers from './helpers/helpers';
|
import helpers from './helpers/helpers';
|
||||||
import inferFlash from './helpers/inferFlash';
|
import inferFlash from './helpers/inferFlash';
|
||||||
|
|
||||||
const {app, ipcMain} = electron;
|
|
||||||
const {isOSX} = helpers;
|
const {isOSX} = helpers;
|
||||||
|
|
||||||
const APP_ARGS_FILE_PATH = path.join(__dirname, '..', 'nativefier.json');
|
const APP_ARGS_FILE_PATH = path.join(__dirname, '..', 'nativefier.json');
|
||||||
|
Loading…
Reference in New Issue
Block a user