-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ethan Gardner
committed
Mar 11, 2022
1 parent
b716904
commit e472964
Showing
4 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
README.md | ||
resources/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/css/* | ||
Cache-Control: public, max-age=14400 | ||
|
||
/img/* | ||
Cache-Control: public, max-age=604800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const files = [ | ||
{ | ||
src: path.join( | ||
__dirname, | ||
'..', | ||
'..', | ||
'_headers.txt' | ||
), | ||
dest: path.join( | ||
__dirname, | ||
'..', | ||
'..', | ||
'_site', | ||
'_headers' | ||
), | ||
}, | ||
]; | ||
|
||
files.forEach((file) => { | ||
let src = file.src; | ||
let dest = file.dest; | ||
if (fs.existsSync(src)) { | ||
fs.copyFile(src, dest, function (err) { | ||
if (err) throw err; | ||
console.log(src, 'was copied to', dest); | ||
}); | ||
} | ||
}); |