feat: migrate from electron-webpack to electron-forge
Electron upgrade : 10.1.3 => 13.1.7 Angular upgrade : 10.1.3 => 12.1.2
This commit is contained in:
2
workspaces/shared-lib/.gitignore
vendored
Normal file
2
workspaces/shared-lib/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Generated JS files
|
||||
dist
|
||||
17
workspaces/shared-lib/apis/window-api-consts.ts
Normal file
17
workspaces/shared-lib/apis/window-api-consts.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export class WindowApiConst {
|
||||
/** Channel used by the renderer process to send data to the main process */
|
||||
public static readonly MULTIPLES_INPUT = "getMultiplesInput";
|
||||
|
||||
/** Channel used by the renderer process to receive data from the main process */
|
||||
public static readonly MULTIPLES_OUTPUT = "getMultiplesOutput";
|
||||
|
||||
/** Whitelist of the safe channels to use when sending data to the main process */
|
||||
public static readonly SENDING_SAFE_CHANNELS = [
|
||||
WindowApiConst.MULTIPLES_INPUT,
|
||||
];
|
||||
|
||||
/** Whitelist of the safe channels to use when receiving data from the main process */
|
||||
public static readonly RECEIVING_SAFE_CHANNELS = [
|
||||
WindowApiConst.MULTIPLES_OUTPUT,
|
||||
];
|
||||
}
|
||||
15
workspaces/shared-lib/apis/window-api.ts
Normal file
15
workspaces/shared-lib/apis/window-api.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export interface WindowApi {
|
||||
/**
|
||||
* This method is used by the renderer process to receive data from the main process
|
||||
* @param channel used by the renderer to receive data and by the main to send them
|
||||
* @param func the callback function to execute when data are available
|
||||
*/
|
||||
receive(channel: any, func: (...data: any) => void): void;
|
||||
|
||||
/**
|
||||
* This method is used by the renderer process to send data to the main process
|
||||
* @param channel used by the renderer to send data and by the main to receive them
|
||||
* @param data the data sent by the renderer process to the main process
|
||||
*/
|
||||
send(channel: string, ...data: any): void;
|
||||
}
|
||||
2
workspaces/shared-lib/index.ts
Normal file
2
workspaces/shared-lib/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './apis/window-api';
|
||||
export * from './apis/window-api-consts';
|
||||
9
workspaces/shared-lib/package.json
Normal file
9
workspaces/shared-lib/package.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "shared-lib",
|
||||
"version": "1.0.2",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
},
|
||||
"author": "Sourcygen",
|
||||
"license": "MIT"
|
||||
}
|
||||
10
workspaces/shared-lib/tsconfig.json
Normal file
10
workspaces/shared-lib/tsconfig.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"sourceMap": true,
|
||||
"composite": true,
|
||||
"declaration": true,
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": ["./**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user