replace Spectron by Playwright
This commit is contained in:
@@ -3,7 +3,6 @@ import { Injectable } from '@angular/core';
|
||||
// If you import a module but never use any of the imported values other than as TypeScript types,
|
||||
// the resulting javascript file will look as if you never imported the module at all.
|
||||
import { ipcRenderer, webFrame } from 'electron';
|
||||
import * as remote from '@electron/remote';
|
||||
import * as childProcess from 'child_process';
|
||||
import * as fs from 'fs';
|
||||
|
||||
@@ -13,7 +12,6 @@ import * as fs from 'fs';
|
||||
export class ElectronService {
|
||||
ipcRenderer: typeof ipcRenderer;
|
||||
webFrame: typeof webFrame;
|
||||
remote: typeof remote;
|
||||
childProcess: typeof childProcess;
|
||||
fs: typeof fs;
|
||||
|
||||
@@ -30,10 +28,9 @@ export class ElectronService {
|
||||
this.childProcess = window.require('child_process');
|
||||
this.fs = window.require('fs');
|
||||
|
||||
// If you want to use a NodeJS 3rd party deps in Renderer process (like @electron/remote),
|
||||
// it must be declared in dependencies of both package.json (in root and app folders)
|
||||
// If you want to use remote object in renderer process, please set enableRemoteModule to true in main.ts
|
||||
this.remote = window.require('@electron/remote');
|
||||
// If you want to use a NodeJS 3rd party deps in Renderer process,
|
||||
// ipcRenderer.invoke can serve many common use cases.
|
||||
// https://www.electronjs.org/docs/latest/api/ipc-renderer#ipcrendererinvokechannel-args
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user