Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Showing with 30 additions and 4 deletions.
  1. BIN favicon.ico
  2. +9 −0 index.html
  3. +13 −0 manifest.json
  4. +8 −4 package.json
View
Binary file not shown.
View
@@ -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
@@ -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
@@ -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": "./"
+}

No commit comments for this range