Commit 9f5b24f6 authored by Natchaya Sripaksee's avatar Natchaya Sripaksee

5

parent 8f4a1250
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<ol>
<li>
เราใช้ node version <script>document.write(process.versions.node)</script>,
</li>
</ol>
<ol>
<li>
Chrome version <script>document.write(process.versions.chrome)</script>,
</li>
</ol>
<ol>
<li>
and Electron version <script>document.write(process.versions.electron)</script>,
</li>
</ol>
</body>
</html>
\ No newline at end of file
const {app, BrowserWindow} = require('electron')
const path = require('path')
const url = require('url')
let win
function createWindow () {
win = new BrowserWindow({width: 800, height: 600})
win.loadURL(
url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true
})
)
win.on('closed', () => {
win = null
})
}
app.on('ready', createWindow)
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
This diff is collapsed.
{
"name": "week5",
"version": "1.0.0",
"description": "\"ขอคะแนน\"",
"main": "main.js",
"scripts": {
"app": "./node_modules/electron/dist/electron .",
"touch": "touch สวีดัด",
"echo": "echo สวีดัด",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Sripakdee",
"license": "ISC",
"devDependencies": {
"electron": "^1.8.2"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment