2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-23 02:28:55 +00:00

Refactor to use ES6 imports for electron modules

This commit is contained in:
Goh Jia Hao 2016-05-26 22:50:15 +08:00
parent 5833347ad8
commit a70433959b
4 changed files with 4 additions and 8 deletions

View File

@ -1,5 +1,4 @@
import electron from 'electron';
const {Menu, ipcMain, shell, BrowserWindow} = electron;
import {Menu, ipcMain, shell, BrowserWindow} from 'electron';
function initContextMenu(mainWindow) {
ipcMain.on('contextMenuOpened', (event, targetHref) => {

View File

@ -1,6 +1,5 @@
import electron from 'electron';
import {BrowserWindow, ipcMain} from 'electron';
import path from 'path';
const {BrowserWindow, ipcMain} = electron;
function createLoginWindow(loginCallback) {
var loginWindow = new BrowserWindow({

View File

@ -1,12 +1,11 @@
import fs from 'fs';
import path from 'path';
import electron from 'electron';
import {BrowserWindow, shell, ipcMain, dialog} from 'electron';
import windowStateKeeper from 'electron-window-state';
import helpers from './../../helpers/helpers';
import createMenu from './../menu/menu';
import initContextMenu from './../contextMenu/contextMenu';
const {BrowserWindow, shell, ipcMain, dialog} = electron;
const {isOSX, linkIsInternal, getCssToInject} = helpers;
const ZOOM_INTERVAL = 0.1;

View File

@ -1,13 +1,12 @@
import 'source-map-support/register';
import fs from 'fs';
import path from 'path';
import electron from 'electron';
import {app, ipcMain} from 'electron';
import createLoginWindow from './components/login/loginWindow';
import createMainWindow from './components/mainWindow/mainWindow';
import helpers from './helpers/helpers';
import inferFlash from './helpers/inferFlash';
const {app, ipcMain} = electron;
const {isOSX} = helpers;
const APP_ARGS_FILE_PATH = path.join(__dirname, '..', 'nativefier.json');