Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
ab5c3fc8f2 | |||
61e463b66f | |||
487ab07f0e | |||
a1882ce241 | |||
75a59b1650 | |||
c3e4ae18c8 | |||
84a2476a0b | |||
f40c390507 |
@ -1,9 +1,9 @@
|
||||
const { contextBridge, ipcRenderer } = require('electron')
|
||||
const { contextBridge, ipcRenderer } = require('electron');
|
||||
contextBridge.exposeInMainWorld('electronApi', {
|
||||
sendMessage: async (channelNameArg, payloadArg) => {
|
||||
ipcRenderer.send(channelNameArg, payloadArg);
|
||||
},
|
||||
receiveMessage: (channelNameArg, func) => {
|
||||
ipcRenderer.on(channelNameArg, (event, ...args) => func(...args));
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -1,10 +1,14 @@
|
||||
{
|
||||
"name": "@api.global/typedelectron",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.7",
|
||||
"private": false,
|
||||
"description": "a package made for ipc communication in electron",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"exports": {
|
||||
"./ts": "./dist_ts/index.js",
|
||||
"./ts_web": "./dist_ts_web/index.js"
|
||||
},
|
||||
"type": "module",
|
||||
"author": "Task Venture Capital GmbH",
|
||||
"license": "MIT",
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@api.global/typedelectron',
|
||||
version: '1.0.3',
|
||||
version: '1.0.7',
|
||||
description: 'a package made for ipc communication in electron'
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import * as plugins from './plugins.js';
|
||||
|
||||
export const packageDir = plugins.path.join(
|
||||
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url)
|
||||
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
|
||||
'../',
|
||||
);
|
||||
|
||||
export const assetsDir = plugins.path.join(packageDir, 'assets');
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@api.global/typedelectron',
|
||||
version: '1.0.3',
|
||||
version: '1.0.7',
|
||||
description: 'a package made for ipc communication in electron'
|
||||
}
|
||||
|
Reference in New Issue
Block a user