https://github.com/christian-draeger/electron-playground
playing around with electron
https://github.com/christian-draeger/electron-playground
Last synced: 8 months ago
JSON representation
playing around with electron
- Host: GitHub
- URL: https://github.com/christian-draeger/electron-playground
- Owner: christian-draeger
- Created: 2018-08-30T10:48:15.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-30T13:06:13.000Z (about 7 years ago)
- Last Synced: 2024-12-25T19:23:49.121Z (9 months ago)
- Language: HTML
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### how to create electron app
create a new project
npm init
add electron library to your projectnpm install --save electron
add index.html and index.js -- basic js setup```
const electron = require('electron');
const {app, BrowserWindow} = electron;
app.on('ready', () => {
const mainWindow = new BrowserWindow({});
mainWindow.loadURL(`file://${__dirname}/index.html`)
});
```
add npn script to run electron app"scripts": {
"electron": "electron ."
}
run app
npm run electron