Skip to content

Commit 2847b33

Browse files
Merge branch 'patch-1' of https://github.com/omidkrad/skeleton-navigation into omidkrad-patch-1
2 parents 687f08c + 687930d commit 2847b33

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

skeleton-es2016/index.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@
44

55
'use strict';
66

7-
var app = require('app');
8-
var BrowserWindow = require('browser-window');
9-
var mainWindow = null;
7+
const electron = require('electron');
8+
const {app} = electron;
9+
const {BrowserWindow} = electron;
10+
let mainWindow;
1011

11-
require('crash-reporter').start();
12-
13-
app.on('window-all-closed', function() {
12+
app.on('window-all-closed', () => {
1413
if (process.platform !== 'darwin') {
1514
app.quit();
1615
}
1716
});
1817

19-
app.on('ready', function() {
18+
app.on('ready', () => {
2019
mainWindow = new BrowserWindow({
2120
width: 800,
2221
height: 600
2322
});
2423

25-
mainWindow.loadUrl('file://' + __dirname + '/index.html');
26-
mainWindow.webContents.on('did-finish-load', function() {
24+
mainWindow.loadURL(`file://${__dirname}/index.html`);
25+
mainWindow.webContents.on('did-finish-load', () => {
2726
mainWindow.setTitle(app.getName());
2827
});
29-
mainWindow.on('closed', function() {
28+
29+
mainWindow.on('closed', () => {
3030
mainWindow = null;
3131
});
3232
});

skeleton-typescript/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<title>Aurelia</title>
5-
<link rel="stylesheet" href="jspm_packages/npm/font-awesome@4.5.0/css/font-awesome.min.css">
5+
<link rel="stylesheet" href="jspm_packages/npm/font-awesome@4.6.1/css/font-awesome.min.css">
66
<link rel="stylesheet" href="styles/styles.css">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
</head>

skeleton-typescript/index.js

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
//Note: This file is provided as an aid to help you get up and running with
22
//Electron for desktop apps. See the readme file for more information.
3+
/* eslint-disable strict, no-var, no-console */
34

45
'use strict';
56

6-
var app = require('app');
7-
var BrowserWindow = require('browser-window');
7+
const electron = require('electron');
8+
const {app} = electron;
9+
const {BrowserWindow} = electron;
10+
let mainWindow;
811

9-
require('crash-reporter').start();
10-
11-
var mainWindow = null;
12-
13-
app.on('window-all-closed', function () {
14-
if (process.platform != 'darwin') {
15-
app.quit();
16-
}
12+
app.on('window-all-closed', () => {
13+
if (process.platform !== 'darwin') {
14+
app.quit();
15+
}
1716
});
1817

19-
app.on('ready', function () {
20-
mainWindow = new BrowserWindow({
21-
width: 800,
22-
height: 600
23-
});
18+
app.on('ready', () => {
19+
mainWindow = new BrowserWindow({
20+
width: 800,
21+
height: 600
22+
});
2423

25-
mainWindow.loadUrl('file://' + __dirname + '/index.html');
26-
mainWindow.webContents.on('did-finish-load', function () {
27-
mainWindow.setTitle(app.getName());
28-
});
29-
mainWindow.on('closed', function () {
30-
mainWindow = null;
31-
});
24+
mainWindow.loadURL(`file://${__dirname}/index.html`);
25+
mainWindow.webContents.on('did-finish-load', () => {
26+
mainWindow.setTitle(app.getName());
27+
});
28+
29+
mainWindow.on('closed', () => {
30+
mainWindow = null;
31+
});
3232
});

0 commit comments

Comments
 (0)