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:
yarn: true
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder

before_script:
# 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')
console.log("userData: ", userData)

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

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

}
})
//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,titleBarStyle: 'hidden'})
//mainWindow = new BrowserWindow({width: 1200, height: 800,frame: false})


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

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

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

]}
]
}
];

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

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

app.on('activate', function () {
// 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.
if (mainWindow === null) {
createWindow()
}
// 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.
if (mainWindow === null) {
createWindow()
}
})

0 comments on commit 4f091a4

Please sign in to comment.