Permalink
...
Comparing changes
Open a pull request
- 2 commits
- 4 files changed
- 0 commit comments
- 1 contributor
Commits on Aug 11, 2016
|
|
jeffposnick |
edda505
|
|||
|
|
jeffposnick |
539cdda
|
Unified
Split
Showing
with
30 additions
and 4 deletions.
- BIN favicon.ico
- +9 −0 index.html
- +13 −0 manifest.json
- +8 −4 package.json
View
BIN
favicon.ico
Binary file not shown.
View
9
index.html
| @@ -3,6 +3,7 @@ | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| + <link rel="manifest" href="manifest.json"> | ||
| <title>React App</title> | ||
| </head> | ||
| <body> | ||
| @@ -17,5 +18,13 @@ | ||
| To begin the development, run `npm start` in this folder. | ||
| To create a production bundle, use `npm run build`. | ||
| --> | ||
| + <script> | ||
| + if ('serviceWorker' in navigator) { | ||
| + navigator.serviceWorker.register('service-worker.js').catch(function(ex) { | ||
| + console.warn(ex); | ||
| + console.warn('(This warning can be safely ignored outside of the production build.)'); | ||
| + }); | ||
| + } | ||
| + </script> | ||
| </body> | ||
| </html> | ||
View
13
manifest.json
| @@ -0,0 +1,13 @@ | ||
| +{ | ||
| + "short_name": "create-react-pwa", | ||
| + "name": "Create React PWApp", | ||
| + "icons": [ | ||
| + { | ||
| + "src": "favicon.ico", | ||
| + "sizes": "192x192", | ||
| + "type": "image/png" | ||
| + } | ||
| + ], | ||
| + "start_url": "./", | ||
| + "display": "standalone" | ||
| +} |
View
12
package.json
| @@ -3,18 +3,22 @@ | ||
| "version": "0.0.1", | ||
| "private": true, | ||
| "devDependencies": { | ||
| - "react-scripts": "0.2.1" | ||
| + "gh-pages": "^0.11.0", | ||
| + "react-scripts": "0.2.1", | ||
| + "sw-precache": "^4.0.0" | ||
| }, | ||
| "dependencies": { | ||
| "react": "^15.2.1", | ||
| "react-dom": "^15.2.1" | ||
| }, | ||
| "scripts": { | ||
| "start": "react-scripts start", | ||
| - "build": "react-scripts build", | ||
| + "build": "react-scripts build && cp manifest.json build/ && sw-precache --root='build/' --static-file-globs='build/**/!(*map*)'", | ||
| + "gh-pages": "gh-pages -d build", | ||
| "eject": "react-scripts eject" | ||
| }, | ||
| "eslintConfig": { | ||
| "extends": "./node_modules/react-scripts/config/eslint.js" | ||
| - } | ||
| -} | ||
| + }, | ||
| + "homepage": "./" | ||
| +} | ||