forked from BoostIO/BoostNote-App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
5,095 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ Thumbs.db | |
compiled/* | ||
dist/* | ||
.cache | ||
electron-dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
const electron = require('electron') | ||
const path = require('path') | ||
// import { format as formatUrl } from 'url' | ||
|
||
const { app, BrowserWindow } = electron | ||
const isDevelopment = process.env.NODE_ENV !== 'production' | ||
|
||
// global reference to mainWindow (necessary to prevent window from being garbage collected) | ||
let mainWindow | ||
|
||
function createMainWindow() { | ||
const window = new BrowserWindow({ | ||
webPreferences: { nodeIntegration: true } | ||
}) | ||
|
||
window.loadFile(path.join(__dirname, '../dist/index.html')) | ||
|
||
// if (isDevelopment) { | ||
// } else { | ||
// window.loadURL(`http://localhost:3000/app`) | ||
// // window.loadURL( | ||
// // formatUrl({ | ||
// // pathname: path.join(__dirname, 'index.html'), | ||
// // protocol: 'file', | ||
// // slashes: true | ||
// // }) | ||
// // ) | ||
// } | ||
|
||
window.on('closed', () => { | ||
mainWindow = null | ||
}) | ||
return window | ||
} | ||
|
||
// quit application when all windows are closed | ||
app.on('window-all-closed', () => { | ||
// on macOS it is common for applications to stay open until the user explicitly quits | ||
if (process.platform !== 'darwin') { | ||
app.quit() | ||
} | ||
}) | ||
|
||
app.on('activate', () => { | ||
// on macOS it is common to re-create a window even after all windows have been closed | ||
if (mainWindow === null) { | ||
mainWindow = createMainWindow() | ||
} | ||
}) | ||
|
||
// create main BrowserWindow when electron is ready | ||
app.on('ready', () => { | ||
mainWindow = createMainWindow() | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "boostnote", | ||
"productName": "Boost Note", | ||
"version": "0.1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>Page Title</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
</head> | ||
<body> | ||
<div id='root'></div> | ||
<script src='/bundle.js'></script> | ||
</body> | ||
</html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<title>Page Title</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
Oops, something went wrong.