How to use overmind-devtools-client - 2 common examples

To help you get started, we’ve selected a few overmind-devtools-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cerebral / overmind / packages / node_modules / overmind-devtools / src / main.js View on Github external
function createWindow() {
  const mainWindow = new BrowserWindow({
    icon: path.resolve('icons', 'icon.png'),
    height: 768,
    width: 768,
    minHeight: 500,
    minWidth: 500,
  })

  const devtoolBackend = DevtoolBackend.create({
    onRelaunch() {
      app.relaunch()
      app.quit()
    },
    // This storage requires objects to be stored, for some weird reason
    storage: {
      get(key) {
        return new Promise((resolve) => {
          storage.get(key, null, (_, data) => {
            if (data) {
              resolve(data.value)
            }
          })
        })
      },
      set(key, value) {
github cerebral / overmind / packages / node_modules / overmind-devtools-vscode / src / extension.ts View on Github external
},

    set(key: string, value: any) {
      return new Promise((resolve) => {
        context.workspaceState.update(key, value)
        resolve()
      })
    },

    clear() {
      return new Promise((resolve) => {
        resolve()
      })
    },
  }
  const devtoolBackend = DevtoolBackend.create({
    onRelaunch() {
      devtoolBackend.close()
      startDevtools()
    },
    storage,
  })
  const devtoolsPanel = new DevtoolsPanel({
    context,
    onMessage: (command, text) => {
      switch (command) {
        case 'newPort':
          storage.set('overmind-devtools.port', text)
          startDevtools()
          break
        case 'restart':
          devtoolBackend.close()

overmind-devtools-client

Overmind devtool

MIT
Latest version published 1 year ago

Package Health Score

58 / 100
Full package analysis

Popular overmind-devtools-client functions