Files
public
src
.gitignore
LICENSE
README.md
angular.json
app.js
main.js
package.json
preload.js
tsconfig.app.json
tsconfig.json
tsconfig.spec.json
Newton-Editor/preload.js

15 lines
499 B
JavaScript
Raw Normal View History

2025-05-27 21:10:45 -05:00
const { contextBridge, ipcRenderer, webUtils } = require('electron')
contextBridge.exposeInMainWorld('electron', {
node: () => process.versions.node,
chrome: () => process.versions.chrome,
electron: () => process.versions.electron,
});
contextBridge.exposeInMainWorld('fs', {
getLspConfigData: () => ipcRenderer.invoke("getLspConfigData"),
getFileContents: (file) => ipcRenderer.invoke("getFileContents", file),
getPathForFile: (file) => webUtils.getPathForFile(file)
});