1.1.6 • Published 3 years ago

@dashingli/plugins-electron-router v1.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

electron-router

LICENSE npm (scoped)

Communicate asynchronously from the main process to renderer processes it's that simple!

Install

yarn add@dashingli/plugins-electron-router

Usage

Main

const router = require('@dashingli/plugins-electron-router')

router.get('list', async (query) => {
  return {
    err: '',
    data: {
      a: 1
    }
  }
})

router.post('save', async(data) => {})
router.put('update', async(data) => {})
router.delete('remove', async(id) => {})

Render

const api = require('@dashingli/plugins-electron-router')

let { err, data } = await api.get('list', query)
// data: { a: 1 }

await api.post('save', {})
await api.put('update', {})
await api.delete('remove', id)
1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago