Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Commit e17ecf2

Browse files
committed
wip
1 parent 4d23787 commit e17ecf2

File tree

9 files changed

+383
-108
lines changed

9 files changed

+383
-108
lines changed

.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BROWSER=none

now.json

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
11
{
2-
"version": 2
2+
"version": 2,
3+
"name": "cache-control",
4+
"builds": [
5+
{
6+
"src": "package.json",
7+
"use": "@now/static-build",
8+
"config": { "distDir": "build" }
9+
}
10+
],
11+
"routes": [
12+
{
13+
"src": "/static/(.*)",
14+
"headers": { "cache-control": "s-maxage=31536000,immutable" },
15+
"dest": "/static/$1"
16+
},
17+
{ "src": "/favicon.ico", "dest": "/favicon.ico" },
18+
{ "src": "/asset-manifest.json", "dest": "/asset-manifest.json" },
19+
{ "src": "/manifest.json", "dest": "/manifest.json" },
20+
{ "src": "/precache-manifest.(.*)", "dest": "/precache-manifest.$1" },
21+
{
22+
"src": "/service-worker.js",
23+
"headers": { "cache-control": "s-maxage=0" },
24+
"dest": "/service-worker.js"
25+
},
26+
{
27+
"src": "/(.*)",
28+
"headers": { "cache-control": "s-maxage=0" },
29+
"dest": "/index.html"
30+
}
31+
]
332
}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"start": "react-scripts start",
1515
"build": "react-scripts build",
1616
"test": "react-scripts test",
17-
"eject": "react-scripts eject"
17+
"eject": "react-scripts eject",
18+
"now-build": "react-scripts build"
1819
},
1920
"eslintConfig": {
2021
"extends": "react-app"

public/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
Learn how to configure a non-root public URL by running `npm run build`.
2424
-->
2525
<title>Cache-Control Header Builder</title>
26+
<script async defer src="https://buttons.github.io/buttons.js"></script>
2627
</head>
2728
<body>
2829
<noscript>You need to enable JavaScript to run this app.</noscript>

0 commit comments

Comments
 (0)