Skip to content

Commit

Permalink
reformating package json and few others
Browse files Browse the repository at this point in the history
  • Loading branch information
sanuann committed Feb 7, 2019
1 parent a0e33be commit 4f091a4
Show file tree
Hide file tree
Showing 4 changed files with 9,520 additions and 9,513 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -25,9 +25,9 @@ matrix:
cache: cache:
yarn: true yarn: true
directories: directories:
- node_modules - node_modules
- $HOME/.cache/electron - $HOME/.cache/electron
- $HOME/.cache/electron-builder - $HOME/.cache/electron-builder


before_script: before_script:
# Replace clientId and clientSecret values in app-config.js with environment # Replace clientId and clientSecret values in app-config.js with environment
Expand Down
115 changes: 61 additions & 54 deletions main.js
Expand Up @@ -18,61 +18,68 @@ let mainWindow
global.userData = app.getPath('documents') global.userData = app.getPath('documents')
console.log("userData: ", userData) console.log("userData: ", userData)


function createWindow () { function createWindow() {
app.server = require(__dirname + '/eapp/app')(); app.server = require(__dirname + '/eapp/app')();


// Create the browser window. // Create the browser window.
mainWindow = new BrowserWindow({width: 1200, mainWindow = new BrowserWindow({
height: 800, width: 1200,
webPreferences: { height: 800,
nodeIntegration: false webPreferences: {
nodeIntegration: false


} }
}) })
//mainWindow = new BrowserWindow({width: 1200, height: 800,titleBarStyle: 'hidden'}) //mainWindow = new BrowserWindow({width: 1200, height: 800,titleBarStyle: 'hidden'})
//mainWindow = new BrowserWindow({width: 1200, height: 800,frame: false}) //mainWindow = new BrowserWindow({width: 1200, height: 800,frame: false})




// and load the index.html of the app. // and load the index.html of the app.
/*mainWindow.loadURL(url.format({ /*mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'), pathname: path.join(__dirname, 'index.html'),
protocol: 'file:', protocol: 'file:',
slashes: true slashes: true
}))*/ }))*/


mainWindow.loadURL('http://127.0.0.1:3000') mainWindow.loadURL('http://127.0.0.1:3000')
mainWindow.webContents.on('new-window', function(e, url) { mainWindow.webContents.on('new-window', function (e, url) {
e.preventDefault(); e.preventDefault();
electron.shell.openExternal(url); electron.shell.openExternal(url);
}); });
// Open the DevTools. // Open the DevTools.
//mainWindow.webContents.openDevTools() //mainWindow.webContents.openDevTools()


// Emitted when the window is closed. // Emitted when the window is closed.
mainWindow.on('closed', function () { mainWindow.on('closed', function () {
// Dereference the window object, usually you would store windows // Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time // in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element. // when you should delete the corresponding element.
mainWindow = null mainWindow = null
}) })
var template = [{ var template = [{
label: "Application", label: "Application",
submenu: [ submenu: [
{ label: "About Application", selector: "orderFrontStandardAboutPanel:" }, {label: "About Application", selector: "orderFrontStandardAboutPanel:"},
{ type: "separator" }, {type: "separator"},
{ label: "Quit", accelerator: "Command+Q", click: function() { app.quit(); }} {
]}, { label: "Quit", accelerator: "Command+Q", click: function () {
app.quit();
}
}
]
}, {
label: "Edit", label: "Edit",
submenu: [ submenu: [
{ label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:" }, {label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:"},
{ label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:" }, {label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:"},
{ type: "separator" }, {type: "separator"},
{ label: "Cut", accelerator: "CmdOrCtrl+X", selector: "cut:" }, {label: "Cut", accelerator: "CmdOrCtrl+X", selector: "cut:"},
{ label: "Copy", accelerator: "CmdOrCtrl+C", selector: "copy:" }, {label: "Copy", accelerator: "CmdOrCtrl+C", selector: "copy:"},
{ label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:" }, {label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:"},
{ label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:" } {label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:"}


]} ]
}
]; ];


Menu.setApplicationMenu(Menu.buildFromTemplate(template)); Menu.setApplicationMenu(Menu.buildFromTemplate(template));
Expand All @@ -85,17 +92,17 @@ app.on('ready', createWindow)


// Quit when all windows are closed. // Quit when all windows are closed.
app.on('window-all-closed', function () { app.on('window-all-closed', function () {
// On OS X it is common for applications and their menu bar // On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q // to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') { if (process.platform !== 'darwin') {
app.quit() app.quit()
} }
}) })


app.on('activate', function () { app.on('activate', function () {
// On OS X it's common to re-create a window in the app when the // On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open. // dock icon is clicked and there are no other windows open.
if (mainWindow === null) { if (mainWindow === null) {
createWindow() createWindow()
} }
}) })

0 comments on commit 4f091a4

Please sign in to comment.