Created
October 7, 2019 10:42
-
-
Save ztamizzen/5709bdb92dbacf79a066773cc7eb83c5 to your computer and use it in GitHub Desktop.
Electron Quickstart for your main.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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