mirror of
https://github.com/netzbegruenung/jitsi-meet-electron.git
synced 2024-05-04 01:33:42 +02:00
Added production config and fixed pack script (#32)
This commit is contained in:
parent
42be533614
commit
ff3b9d9251
10
main.js
10
main.js
|
@ -4,6 +4,8 @@ const electron = require('electron');
|
||||||
const APP = electron.app;
|
const APP = electron.app;
|
||||||
const BrowserWindow = electron.BrowserWindow;
|
const BrowserWindow = electron.BrowserWindow;
|
||||||
|
|
||||||
|
const isDev = require('electron-is-dev');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
setupAlwaysOnTopMain
|
setupAlwaysOnTopMain
|
||||||
} = require('jitsi-meet-electron-utils');
|
} = require('jitsi-meet-electron-utils');
|
||||||
|
@ -11,11 +13,17 @@ const {
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const URL = require('url');
|
const URL = require('url');
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Path to root directory
|
||||||
|
*/
|
||||||
|
const basePath = isDev ? __dirname : electron.app.getAppPath();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* URL for index.html which will be our entry point.
|
* URL for index.html which will be our entry point.
|
||||||
*/
|
*/
|
||||||
const indexURL = URL.format({
|
const indexURL = URL.format({
|
||||||
pathname: path.resolve(__dirname, './build/index.html'),
|
pathname: path.resolve(basePath, './build/index.html'),
|
||||||
protocol: 'file:',
|
protocol: 'file:',
|
||||||
slashes: true
|
slashes: true
|
||||||
});
|
});
|
||||||
|
|
21
package-lock.json
generated
21
package-lock.json
generated
|
@ -3017,6 +3017,11 @@
|
||||||
"sumchecker": "1.3.1"
|
"sumchecker": "1.3.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"electron-is-dev": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-0.3.0.tgz",
|
||||||
|
"integrity": "sha1-FOb9pcaOnk7L7/nM8DfL18BcWv4="
|
||||||
|
},
|
||||||
"electron-osx-sign": {
|
"electron-osx-sign": {
|
||||||
"version": "0.4.10",
|
"version": "0.4.10",
|
||||||
"resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.10.tgz",
|
"resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.10.tgz",
|
||||||
|
@ -6155,15 +6160,6 @@
|
||||||
"postis": "2.2.0",
|
"postis": "2.2.0",
|
||||||
"prebuild-install": "2.5.3",
|
"prebuild-install": "2.5.3",
|
||||||
"robotjs": "github:jitsi/robotjs#5cc469f655669e728b61271c2c57ce97d62976fd"
|
"robotjs": "github:jitsi/robotjs#5cc469f655669e728b61271c2c57ce97d62976fd"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"robotjs": {
|
|
||||||
"version": "github:jitsi/robotjs#5cc469f655669e728b61271c2c57ce97d62976fd",
|
|
||||||
"requires": {
|
|
||||||
"nan": "2.10.0",
|
|
||||||
"prebuild-install": "2.5.3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"js-tokens": {
|
"js-tokens": {
|
||||||
|
@ -8827,6 +8823,13 @@
|
||||||
"inherits": "2.0.3"
|
"inherits": "2.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"robotjs": {
|
||||||
|
"version": "github:jitsi/robotjs#5cc469f655669e728b61271c2c57ce97d62976fd",
|
||||||
|
"requires": {
|
||||||
|
"nan": "2.10.0",
|
||||||
|
"prebuild-install": "2.5.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"run-async": {
|
"run-async": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
"name": "jitsi-meet-electron",
|
"name": "jitsi-meet-electron",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "Electron application for Jitsi Meet",
|
"description": "Electron application for Jitsi Meet",
|
||||||
"main": "main.js",
|
"main": "build/main.js",
|
||||||
"productName": "Jitsi Meet",
|
"productName": "Jitsi Meet",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "webpack --config ./webpack.config.js --progress && electron ./build/main.js",
|
"start": "webpack --config ./webpack.config.js --mode development && electron ./build/main.js",
|
||||||
"clean": "rm -rf node_modules",
|
"clean": "rm -rf node_modules",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"pack": "electron-packager .",
|
"pack": "webpack --config ./webpack.config.js --mode production && electron-packager .",
|
||||||
"postinstall": "electron-rebuild",
|
"postinstall": "electron-rebuild",
|
||||||
"validate": "npm ls"
|
"validate": "npm ls"
|
||||||
},
|
},
|
||||||
|
@ -30,6 +30,7 @@
|
||||||
"readmeFilename": "README.md",
|
"readmeFilename": "README.md",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"electron-is-dev": "0.3.0",
|
||||||
"jitsi-meet-electron-utils": "jitsi/jitsi-meet-electron-utils",
|
"jitsi-meet-electron-utils": "jitsi/jitsi-meet-electron-utils",
|
||||||
"react": "16.3.2",
|
"react": "16.3.2",
|
||||||
"react-dom": "16.3.2"
|
"react-dom": "16.3.2"
|
||||||
|
|
|
@ -9,7 +9,6 @@ const commonConfig = {
|
||||||
node: {
|
node: {
|
||||||
__dirname: true
|
__dirname: true
|
||||||
},
|
},
|
||||||
mode: 'development',
|
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
|
@ -50,7 +49,7 @@ module.exports = [
|
||||||
commonConfig),
|
commonConfig),
|
||||||
Object.assign({
|
Object.assign({
|
||||||
target: 'electron-renderer',
|
target: 'electron-renderer',
|
||||||
entry: { renderer: './app/index.js' },
|
entry: { app: './app/index.js' },
|
||||||
plugins: [
|
plugins: [
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: './app/index.html'
|
template: './app/index.html'
|
||||||
|
|
Loading…
Reference in a new issue