FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
learnreactjs.github.io/banner.js at master · learnreactjs/learnreactjs.github.io · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
learnreactjs
/
learnreactjs.github.io
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
4
Code
Issues
0
Pull requests
6
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
learnreactjs.github.io
/
banner.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (18 loc) · 634 Bytes
Breadcrumbs
learnreactjs.github.io
/
banner.js
Copy path
File metadata and controls
19 lines (18 loc) · 634 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
const
fs
=
require
(
"fs"
)
;
const
pkg
=
require
(
"./package.json"
)
;
const
filename
=
"assets/js/main.min.js"
;
const
script
=
fs
.
readFileSync
(
filename
)
;
const
padStart
=
str
=>
(
"0"
+
str
)
.
slice
(
-
2
)
;
const
dateObj
=
new
Date
(
)
;
const
date
=
`
${
dateObj
.
getFullYear
(
)
}
-
${
padStart
(
dateObj
.
getMonth
(
)
+
1
)
}
-
${
padStart
(
dateObj
.
getDate
(
)
)
}
`
;
const
banner
=
`/*!
* Minimal Mistakes Jekyll Theme
${
pkg
.
version
}
by
${
pkg
.
author
}
* Copyright 2013-
${
dateObj
.
getFullYear
(
)
}
Michael Rose - mademistakes.com | @mmistakes
* Licensed under
${
pkg
.
license
}
*/
`
;
if
(
script
.
slice
(
0
,
3
)
!=
"/**"
)
{
fs
.
writeFileSync
(
filename
,
banner
+
script
)
;
}
Back
|
FazBrowse Home
|
New Git URL