How to use the nextron.prepareNext function in nextron

To help you get started, we’ve selected a few nextron 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 saltyshiomix / nextron / examples / with-javascript / main / index.js View on Github external
async function createMainWindow() {
  isDev && await prepareNext('./renderer')

  const window = new BrowserWindow()
  isDev && window.webContents.openDevTools()

  const url = isDev ? 'http://localhost:8000/home' : format({
    pathname: path.join(__dirname, '../renderer/home/index.html'),
    protocol: 'file',
    slashes: true
  })

  window.loadURL(url)

  window.on('closed', () => {
    mainWindow = null
  })
github saltyshiomix / nextron / examples / with-typescript / main / index.ts View on Github external
async function createMainWindow(): Promise {
  isDev && await prepareNext('./renderer')

  const window: BrowserWindow = new BrowserWindow()
  isDev && window.webContents.openDevTools()

  const url: string = isDev ? 'http://localhost:8000/home' : format({
    pathname: path.join(__dirname, '../renderer/home/index.html'),
    protocol: 'file',
    slashes: true
  })

  window.loadURL(url)

  window.on('closed', () => {
    mainWindow = null
  })

nextron

⚡ NEXT.js + Electron ⚡

MIT
Latest version published 5 months ago

Package Health Score

70 / 100
Full package analysis