Skip to content

Instantly share code, notes, and snippets.

@ztamizzen
Created October 7, 2019 10:42
Show Gist options
  • Save ztamizzen/5709bdb92dbacf79a066773cc7eb83c5 to your computer and use it in GitHub Desktop.
Save ztamizzen/5709bdb92dbacf79a066773cc7eb83c5 to your computer and use it in GitHub Desktop.
Electron Quickstart for your main.js
{
"Electron QuickStart": {
"scope": "javascript,typescript",
"prefix": "electron",
"body": [
"const { app, BrowserWindow } = require('electron');",
"",
"function createWindow() {",
"\tconst win = new BrowserWindow({",
"\t\twidth: 800,",
"\t\theight: 600,",
"\t\twebPreferences: {",
"\t\t\tnodeIntegration: true",
"\t\t},",
"\t\tresizable: false",
"\t});",
"",
"\twin.loadFile('index.html');",
"}",
"",
"app.on('ready', createWindow);",
""
],
"description": "Generate a Quickstart BrowserWindow template"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment