Skip to content

Commit

Permalink
testing loading files, and created definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Promises committed Aug 8, 2019
1 parent 69efd6e commit fef61c6
Show file tree
Hide file tree
Showing 16 changed files with 184,976 additions and 76 deletions.
9 changes: 6 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"outputPath": "dist/Wc3JsonEditor",
"outputPath": "dist/",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": false,
"customWebpackConfig": {
"path": "./webpack.config.js"
},
"assets": [
"src/favicon.ico",
"src/assets"
Expand Down Expand Up @@ -126,4 +129,4 @@
}
}},
"defaultProject": "Wc3JsonEditor"
}
}
12 changes: 0 additions & 12 deletions browserslist

This file was deleted.

55 changes: 55 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
const {app, BrowserWindow} = require('electron');
require('electron-reload')(__dirname+'/dist');
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win;

function createWindow() {
// Create the browser window.
win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
});

// and load the index.html of the app.
win.loadFile('dist/index.html');

// Open the DevTools.
win.webContents.openDevTools();

// Emitted when the window is closed.
win.on('closed', () => {
// 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.
win = null
})
}

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow);

// Quit when all windows are closed.
app.on('window-all-closed', () => {
// On macOS 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', () => {
// On macOS 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 (win === null) {
createWindow()
}
});

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.
Loading

0 comments on commit fef61c6

Please sign in to comment.