FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
stackgl.github.io/data/sync.js at master · stackgl/stackgl.github.io · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
stackgl
/
stackgl.github.io
Public
Notifications
You must be signed in to change notification settings
Fork
6
Star
60
Code
Issues
0
Pull requests
14
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
stackgl.github.io
/
data
/
sync.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (19 loc) · 659 Bytes
Breadcrumbs
stackgl.github.io
/
data
/
sync.js
Copy path
File metadata and controls
22 lines (19 loc) · 659 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var
replace
=
require
(
'replacestream'
)
var
wrap
=
require
(
'wrap-stream'
)
var
request
=
require
(
'request'
)
var
path
=
require
(
'path'
)
var
url
=
require
(
'url'
)
var
fs
=
require
(
'fs'
)
var
wiki
=
'https://github.com/stackgl/stackgl.github.io/wiki/'
;
[
'examples'
]
.
forEach
(
function
(
slug
)
{
var
Slug
=
slug
.
slice
(
0
,
1
)
.
toUpperCase
(
)
+
slug
.
slice
(
1
)
var
uri
=
url
.
resolve
(
wiki
,
Slug
)
var
dst
=
path
.
join
(
__dirname
,
slug
+
'.md'
)
request
(
uri
+
'.md'
)
.
pipe
(
replace
(
'\r'
,
''
)
)
.
pipe
(
wrap
(
'# '
+
Slug
+
'\n\n'
,
'\n'
)
)
.
pipe
(
fs
.
createWriteStream
(
dst
)
)
.
once
(
'close'
,
function
(
)
{
console
.
log
(
'* updated '
+
slug
)
}
)
}
)
Back
|
FazBrowse Home
|
New Git URL