Skip to content

Commit cdd1ed3

Browse files
committed
docs: for keeping sync with phoenix-fs repo
1 parent 31186d0 commit cdd1ed3

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

src-electron/main-app-ipc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/**
22
* IPC handlers for electronAppAPI
33
* Preload location: contextBridge.exposeInMainWorld('electronAppAPI', { ... })
4+
*
5+
* NOTE: This file is copied from phoenix-fs library. Do not modify without
6+
* updating the source library. Only add new Phoenix-specific handlers to main-window-ipc.js.
47
*/
58

69
const { app, ipcMain } = require('electron');

src-electron/main-fs-ipc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/**
22
* IPC handlers for electronFSAPI
33
* Preload location: contextBridge.exposeInMainWorld('electronFSAPI', { ... })
4+
*
5+
* NOTE: This file is copied from phoenix-fs library. Do not modify without
6+
* updating the source library. Only add new Phoenix-specific handlers to main-window-ipc.js.
47
*/
58

69
const { ipcMain, dialog, BrowserWindow } = require('electron');

src-electron/preload.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
const { contextBridge, ipcRenderer } = require('electron');
22

3+
/**
4+
* electronAppAPI - Process lifecycle and app info APIs
5+
* NOTE: This API block is copied from phoenix-fs library. Do not modify without
6+
* updating the source library. Only add new Phoenix-specific APIs to electronAPI below.
7+
*/
38
contextBridge.exposeInMainWorld('electronAppAPI', {
49
// App info
510
getAppName: () => ipcRenderer.invoke('get-app-name'),
@@ -26,7 +31,11 @@ contextBridge.exposeInMainWorld('electronAppAPI', {
2631
getCliArgs: () => ipcRenderer.invoke('get-cli-args')
2732
});
2833

29-
// the electronFSAPI is the fn that you need to copy to your election app impl for the fs to work.
34+
/**
35+
* electronFSAPI - File system APIs
36+
* NOTE: This API block is copied from phoenix-fs library. Do not modify without
37+
* updating the source library. Only add new Phoenix-specific APIs to electronAPI below.
38+
*/
3039
contextBridge.exposeInMainWorld('electronFSAPI', {
3140
// Path utilities
3241
path: {

0 commit comments

Comments
 (0)