Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
nodejs-60-2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ธีรพงษ์ วงค์อนันต์
nodejs-60-2
Commits
87bd99fc
Commit
87bd99fc
authored
Feb 14, 2018
by
ธีรพงษ์ วงค์อนันต์
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
week5
parent
2edf5d49
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
0 deletions
+54
-0
.gitignore
week05/windowapp/.gitignore
+0
-0
index.html
week05/windowapp/index.html
+15
-0
main.js
week05/windowapp/main.js
+21
-0
package-lock.json
week05/windowapp/package-lock.json
+0
-0
package.json
week05/windowapp/package.json
+18
-0
No files found.
week05/windowapp/.gitignore
0 → 100644
View file @
87bd99fc
week05/windowapp/index.html
0 → 100644
View file @
87bd99fc
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
สวัสดี ชาวโลก!
</title>
</head>
<body>
<h1>
สวัสดี ชาวโลก!
</h1>
<ol>
<li>
เราใช้ node เวอร์ชั่น
<script>
document
.
write
(
process
.
versions
.
node
)
</script>
,
</li>
<li>
Chrome เวอร์ชั่น
<script>
document
.
write
(
process
.
versions
.
chrome
)
</script>
,
</li>
<li>
และ Electron เวอร์ชั่น
<script>
document
.
write
(
process
.
versions
.
electron
)
</script>
.
</li>
</ol>
</body>
</html>
week05/windowapp/main.js
0 → 100644
View file @
87bd99fc
const
{
app
,
BrowserWindow
}
=
require
(
'electron'
)
const
path
=
require
(
'path'
)
const
url
=
require
(
'url'
)
let
win
function
creatWindow
()
{
win
=
new
BrowserWindow
({
width
:
800
,
height
:
600
})
win
.
loadURL
(
url
.
format
({
pathname
:
path
.
join
(
__dirname
,
'index.html'
),
protocol
:
'file:'
,
//'http:'
slashes
:
true
})
)
win
.
on
(
'close'
,()
=>
{
win
=
null
})
}
app
.
on
(
"ready"
,
creatWindow
)
week05/windowapp/package-lock.json
0 → 100644
View file @
87bd99fc
This diff is collapsed.
Click to expand it.
week05/windowapp/package.json
0 → 100644
View file @
87bd99fc
{
"name"
:
"windowapp"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"main.js"
,
"scripts"
:
{
"app"
:
"./node_modules/electron/dist/electron ."
,
"อันตราย"
:
"rm -rf *"
,
"touch"
:
"touch สวัสดี"
,
"echo"
:
"echo สวัสดี"
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
"author"
:
"teerapong.wo"
,
"license"
:
"ISC"
,
"devDependencies"
:
{
"electron"
:
"^1.8.2"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment