2021-10-01 11:39:50 +00:00
|
|
|
|
const electron = require("electron")
|
|
|
|
|
const path = require('path')
|
2021-10-01 14:33:13 +00:00
|
|
|
|
// const tf = require('@tensorflow/tfjs-node')
|
2021-10-01 11:39:50 +00:00
|
|
|
|
electron.contextBridge.exposeInMainWorld(
|
|
|
|
|
"ocogeapi",
|
|
|
|
|
{
|
|
|
|
|
// Electron固有:index.htmlから直接 <script src で呼ばれたJSファイルでのみ利用可
|
|
|
|
|
electron_ipcRenderer: electron.ipcRenderer,
|
|
|
|
|
electron_shell: electron.shell,
|
|
|
|
|
// どこからでも呼び出し可
|
|
|
|
|
fs: require('fs'),
|
|
|
|
|
path: path,
|
|
|
|
|
child_process: require('child_process'),
|
2021-10-01 14:33:13 +00:00
|
|
|
|
tfjs_node: require('@tensorflow/tfjs-node'),
|
|
|
|
|
// tfjs_node: tf,
|
|
|
|
|
// face_api: require('@vladmandic/face-api/dist/face-api.node.js'),
|
2021-10-01 11:39:50 +00:00
|
|
|
|
lgpio: require('@ocogeclub/lgpio'),
|
|
|
|
|
bme280: require('@ocogeclub/bme280'),
|
|
|
|
|
// グローバル変数
|
|
|
|
|
gtest: 'qwerty' // テスト用
|
|
|
|
|
}
|
|
|
|
|
);
|