Skip to content
Permalink
Browse files

reformating package json and few others

  • Loading branch information...
sanuann committed Feb 7, 2019
1 parent a0e33be commit 4f091a40f46857ac979df611a7ed04fa0be7f587
Showing with 9,520 additions and 9,513 deletions.
  1. +3 −3 .travis.yml
  2. +61 −54 main.js
  3. +9,375 −9,375 package-lock.json
  4. +81 −81 package.json
@@ -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
115 main.js
@@ -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));
@@ -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()
}
})
Oops, something went wrong.

0 comments on commit 4f091a4

Please sign in to comment.
You can’t perform that action at this time.