Skip to content

Commit

Permalink
Merge pull request #6 from hczs/0.2.0
Browse files Browse the repository at this point in the history
🐛 修复构建失败问题
  • Loading branch information
hczs authored Oct 29, 2023
2 parents fb7426c + 4d699c1 commit e6efa89
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/samples/node-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { lstat } from 'node:fs/promises'
import { cwd } from 'node:process'
import { ipcRenderer } from 'electron'

ipcRenderer.on('main-process-message', (_event, ...args) => {
console.log('[Receive Main-process message]:', ...args)
})

lstat(cwd()).then(stats => {
console.log('[fs.lstat]', stats)
}).catch(err => {
console.error(err)
})

0 comments on commit e6efa89

Please sign in to comment.