Skip to content

Commit 8072cd5

Browse files
committed
Initial commit
0 parents  commit 8072cd5

File tree

4 files changed

+2788
-0
lines changed

4 files changed

+2788
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
out

package.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"name": "wunderlist-download",
3+
"productName": "wunderlist-download",
4+
"version": "1.0.0",
5+
"description": "My Electron application description",
6+
"main": "src/index.js",
7+
"scripts": {
8+
"start": "electron-forge start",
9+
"package": "electron-forge package",
10+
"make": "electron-forge make",
11+
"publish": "electron-forge publish",
12+
"lint": "echo \"No linting configured\""
13+
},
14+
"keywords": [],
15+
"author": "Brandon",
16+
"license": "MIT",
17+
"config": {
18+
"forge": {
19+
"packagerConfig": {},
20+
"makers": [
21+
{
22+
"name": "@electron-forge/maker-squirrel",
23+
"config": {
24+
"name": "wunderlist_download"
25+
}
26+
},
27+
{
28+
"name": "@electron-forge/maker-zip",
29+
"platforms": [
30+
"darwin"
31+
]
32+
},
33+
{
34+
"name": "@electron-forge/maker-deb",
35+
"config": {}
36+
},
37+
{
38+
"name": "@electron-forge/maker-rpm",
39+
"config": {}
40+
}
41+
]
42+
}
43+
},
44+
"dependencies": {
45+
"electron-squirrel-startup": "^1.0.0"
46+
},
47+
"devDependencies": {
48+
"@electron-forge/cli": "6.0.0-beta.34",
49+
"@electron-forge/maker-deb": "6.0.0-beta.34",
50+
"@electron-forge/maker-rpm": "6.0.0-beta.34",
51+
"@electron-forge/maker-squirrel": "6.0.0-beta.34",
52+
"@electron-forge/maker-zip": "6.0.0-beta.34",
53+
"electron": "5.0.2"
54+
}
55+
}

src/index.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
const { app, BrowserWindow } = require('electron');
2+
3+
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
4+
if (require('electron-squirrel-startup')) { // eslint-disable-line global-require
5+
app.quit();
6+
}
7+
8+
// Keep a global reference of the window object, if you don't, the window will
9+
// be closed automatically when the JavaScript object is garbage collected.
10+
let mainWindow;
11+
12+
const createWindow = () => {
13+
// Create the browser window.
14+
mainWindow = new BrowserWindow({
15+
width: 800,
16+
height: 600,
17+
});
18+
19+
// and load the index.html of the app.
20+
mainWindow.loadURL(`https://eager-archimedes-bdc476.netlify.com/`);
21+
22+
mainWindow.webContents.openDevTools()
23+
24+
// Emitted when the window is closed.
25+
mainWindow.on('closed', () => {
26+
// Dereference the window object, usually you would store windows
27+
// in an array if your app supports multi windows, this is the time
28+
// when you should delete the corresponding element.
29+
mainWindow = null;
30+
});
31+
};
32+
33+
// This method will be called when Electron has finished
34+
// initialization and is ready to create browser windows.
35+
// Some APIs can only be used after this event occurs.
36+
app.on('ready', createWindow);
37+
38+
// Quit when all windows are closed.
39+
app.on('window-all-closed', () => {
40+
// On OS X it is common for applications and their menu bar
41+
// to stay active until the user quits explicitly with Cmd + Q
42+
if (process.platform !== 'darwin') {
43+
app.quit();
44+
}
45+
});
46+
47+
app.on('activate', () => {
48+
// On OS X it's common to re-create a window in the app when the
49+
// dock icon is clicked and there are no other windows open.
50+
if (mainWindow === null) {
51+
createWindow();
52+
}
53+
});
54+
55+
// In this file you can include the rest of your app's specific main process
56+
// code. You can also put them in separate files and import them here.

0 commit comments

Comments
 (0)