Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

electron js

const { app, BrowserWindow } = require('electron')
const path = require('path')

function createWindow () {
  const win = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      preload: path.join(__dirname, 'preload.js')
    }
  })

  win.loadFile('index.html')
}

app.whenReady().then(() => {
  createWindow()

  app.on('activate', () => {
    if (BrowserWindow.getAllWindows().length === 0) {
      createWindow()
    }
  })
})

app.on('window-all-closed', () => {
  if (process.platform !== 'darwin') {
    app.quit()
  }
})
Comment

electronjs

# electron latest
npm i -D electron@latest

# electron beta
npm i -D electron@beta

# electron alpha
npm i -D electron@alpha

# electron nightly
npm i -D electron-nightly
Comment

ElectronJs

git clone https://github.com/electron/electron-quick-start
cd electron-quick-start
npm install && npm start
Comment

electron js

$ npm i -D electron@latest
# Electron   10.1.3
# Node       12.16.3
# Chromium   85.0.4183.121
Comment

electron js

$ npm i -D electron@beta
# Electron   11.0.0-beta.9
# Node       12.18.3
# Chromium   87.0.4251.1
Comment

electron js

$ npm i -D electron@latest
# Electron   11.2.3
# Node       12.18.3
# Chromium   87.0.4280.141
Comment

electron js

$ npm i -D electron-nightly
# Electron   12.0.0-nightly.20200914
# Node       12.18.3
# Chromium   86.0.4234.0
Comment

PREVIOUS NEXT
Code Example
Javascript :: sequelize change item 
Javascript :: event handler 
Javascript :: remove row from array javascript 
Javascript :: .then(async 
Javascript :: syntax of ternary operator in javascript 
Javascript :: You will need to rewrite or cast the expression. 
Javascript :: javascript regular expression end of string 
Javascript :: how to move an element to the cursor in javascript 
Javascript :: quote 
Javascript :: axios delete 
Javascript :: javascript Insert Item to Map 
Javascript :: find vs filter 
Javascript :: Javascript async await & Promise 
Javascript :: html table to csv javascript 
Javascript :: react native splash screen 
Javascript :: lodash template literal 
Javascript :: base64 from file 
Javascript :: angular flex layout 
Javascript :: what is promise in javascript 
Javascript :: var = {} js 
Javascript :: dispatch store 
Javascript :: switch statement 
Javascript :: get last item in array js 
Javascript :: make button disabled if input is empty angular 
Javascript :: bind() in javascript 
Javascript :: npm ERR! missing script: build:dev 
Javascript :: local 
Javascript :: eventlistener javascript 
Javascript :: replace() in javascript 
Javascript :: discord.js TypeError: Reactedmsg.delete message using id 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =