ngx-electron-plus
Version:
This library is a fork of a great module created by Thorsten Hans located here: http://github.com/ThorstenHans/ngx-electron With more usefull tools fs-jetpack , node-powershell, notifier, ssh2.Client etc...
54 lines (49 loc) • 2.03 kB
JavaScript
import { __decorate } from 'tslib';
import { ɵɵdefineInjectable, Injectable, NgModule } from '@angular/core';
let NgxElectronPlusService = class NgxElectronPlusService {
constructor() {
// Conditional imports
if (this.isElectron) {
this.ipcRenderer = window.require('electron').ipcRenderer;
this.webFrame = window.require('electron').webFrame;
this.remote = window.require('electron').remote;
this.os = window.require('os');
this.powershell = window.require('node-powershell');
this.childProcess = window.require('child_process');
this.fs = window.require('fs-jetpack');
this.shell = window.require('electron').shell;
this.desktopCapturer = window.require('electron').desktopCapturer;
this.clipboard = window.require('electron').clipboard;
this.screen = window.screen;
this.nativeImage = window.require('electron').nativeImage;
this.ssh = window.require('ssh2').Client;
this.notifier = window.require('node-notifier');
}
}
get isElectron() {
return !!(window && window.process && window.process.type);
}
};
NgxElectronPlusService.ɵprov = ɵɵdefineInjectable({ factory: function NgxElectronPlusService_Factory() { return new NgxElectronPlusService(); }, token: NgxElectronPlusService, providedIn: "root" });
NgxElectronPlusService = __decorate([
Injectable({
providedIn: 'root'
})
], NgxElectronPlusService);
/*
* Public API Surface of ngx-electron-plus
*/
let NgxElectronPlusModule = class NgxElectronPlusModule {
};
NgxElectronPlusModule = __decorate([
NgModule({
declarations: [],
exports: [],
providers: [NgxElectronPlusService]
})
], NgxElectronPlusModule);
/**
* Generated bundle index. Do not edit.
*/
export { NgxElectronPlusModule, NgxElectronPlusService };
//# sourceMappingURL=ngx-electron-plus.js.map