drop support of electron - bad practise to mix website with electron app
This commit is contained in:
parent
0c3f9204bc
commit
66eb72d7fb
@ -68,20 +68,6 @@ Debian_Server:
|
||||
- deb/OpenMediaCenter-*.deb
|
||||
needs: ["Minimize"]
|
||||
|
||||
Electron_Client:
|
||||
stage: packaging
|
||||
image: electronuserland/builder:wine
|
||||
script:
|
||||
- npm run buildlinux
|
||||
- npm run buildwin
|
||||
artifacts:
|
||||
expire_in: 2 days
|
||||
paths:
|
||||
- dist/*.rpm
|
||||
- dist/*.deb
|
||||
- dist/*.exe
|
||||
needs: ["Minimize"]
|
||||
|
||||
Test_Server:
|
||||
stage: deploy
|
||||
image: luki42/alpineopenssh:latest
|
||||
|
21
build.js
21
build.js
@ -1,21 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
const builder = require("electron-builder");
|
||||
const builds = {};
|
||||
process.argv.slice(1).forEach(a => {
|
||||
if (a === "--linux") {
|
||||
builds.linux = [];
|
||||
}
|
||||
if (a === "--win") {
|
||||
builds.win = [];
|
||||
}
|
||||
if (a === "--mac") {
|
||||
builds.mac = [];
|
||||
|
||||
}
|
||||
});
|
||||
builder.build(builds).then(e => {
|
||||
console.log(e);
|
||||
}).catch(e => {
|
||||
console.error(e);
|
||||
});
|
1569
package-lock.json
generated
1569
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
29
package.json
29
package.json
@ -25,32 +25,7 @@
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "CI=true react-scripts test --reporters=jest-junit --verbose --silent --coverage --reporters=default",
|
||||
"buildlinux": "node build.js --linux",
|
||||
"buildwin": "node build.js --win",
|
||||
"electron-dev": "electron ."
|
||||
},
|
||||
"build": {
|
||||
"appId": "com.heili.openmediacenter",
|
||||
"files": [
|
||||
"build/**/*"
|
||||
],
|
||||
"directories": {
|
||||
"buildResources": "assets"
|
||||
},
|
||||
"linux": {
|
||||
"target": [
|
||||
"rpm",
|
||||
"deb",
|
||||
"snap",
|
||||
"AppImage"
|
||||
]
|
||||
},
|
||||
"win": {
|
||||
"target": [
|
||||
"nsis"
|
||||
]
|
||||
}
|
||||
"test": "CI=true react-scripts test --reporters=jest-junit --verbose --silent --coverage --reporters=default"
|
||||
},
|
||||
"jest": {
|
||||
"collectCoverageFrom": [
|
||||
@ -103,8 +78,6 @@
|
||||
"@types/node": "^12.19.9",
|
||||
"@types/react": "^16.14.2",
|
||||
"@types/react-dom": "^16.9.10",
|
||||
"electron": "^11.1.0",
|
||||
"electron-builder": "^22.1.0",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-adapter-react-16": "^1.15.5",
|
||||
"jest-junit": "^12.0.0",
|
||||
|
@ -1,31 +0,0 @@
|
||||
const electron = require('electron');
|
||||
const app = electron.app;
|
||||
const BrowserWindow = electron.BrowserWindow;
|
||||
|
||||
const path = require('path');
|
||||
const url = require('url');
|
||||
const isDev = process.env.NODE_ENV === "development";
|
||||
|
||||
let mainWindow;
|
||||
|
||||
function createWindow() {
|
||||
mainWindow = new BrowserWindow({width: 1500, height: 880});
|
||||
mainWindow.loadURL(isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, '../build/index.html')}`);
|
||||
mainWindow.on('closed', () => mainWindow = null);
|
||||
}
|
||||
|
||||
app.on('ready', createWindow);
|
||||
|
||||
console.log( process.env.NODE_ENV);
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
if (mainWindow === null) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user