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:
13
workspaces/electron-app/main/services/abstract-service.ts
Normal file
13
workspaces/electron-app/main/services/abstract-service.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export class AbstractService {
|
||||
receptionChannel(): string {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
sendingChannel(): string {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
process(...args: any): any {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
}
|
||||
21
workspaces/electron-app/main/services/multiples-service.ts
Normal file
21
workspaces/electron-app/main/services/multiples-service.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { WindowApiConst } from "shared-lib";
|
||||
import { AbstractService } from "./abstract-service";
|
||||
|
||||
export class MultiplesService extends AbstractService {
|
||||
receptionChannel(): string {
|
||||
return WindowApiConst.MULTIPLES_INPUT;
|
||||
}
|
||||
|
||||
sendingChannel(): string {
|
||||
return WindowApiConst.MULTIPLES_OUTPUT;
|
||||
}
|
||||
|
||||
process(...args: any): any {
|
||||
// From 1 to 10, return input multiples
|
||||
const multiples = [];
|
||||
for (let n = 1; n <= 10; n++) {
|
||||
multiples.push(n * args[0]);
|
||||
}
|
||||
return multiples;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user