-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change pulls in latest react-scripts and its dependencies. This also brought a new linter and a full customizable service worker which makes lots of the previous hacks no longer required. Yay! Also the new linter showed some errors which needed fixes.
- Loading branch information
Showing
18 changed files
with
4,070 additions
and
3,682 deletions.
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 |
---|---|---|
|
@@ -4,4 +4,3 @@ dist/* | |
es/* | ||
tests/* | ||
coverage/* | ||
public/sw.js |
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 |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
/test | ||
/coverage | ||
/.eslintcache | ||
/public/sw.js | ||
|
||
# production | ||
/build | ||
|
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
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
/* global module */ | ||
|
||
const JSDOMEnvironment = require('jest-environment-jsdom'); | ||
|
||
// Mocks. | ||
|
This file was deleted.
Oops, something went wrong.
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
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
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
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,53 @@ | ||
/* eslint-disable no-restricted-globals */ | ||
|
||
// This service worker can be customized! | ||
// See https://developers.google.com/web/tools/workbox/modules | ||
// for the list of available Workbox modules, or add any other | ||
// code you'd like. | ||
|
||
import { clientsClaim } from 'workbox-core'; | ||
import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching'; | ||
import { registerRoute } from 'workbox-routing'; | ||
|
||
clientsClaim(); | ||
|
||
// Precache all of the assets generated by your build process. | ||
// Their URLs are injected into the manifest variable below. | ||
// This variable must be present somewhere in your service worker file, | ||
// even if you decide not to use precaching. See https://cra.link/PWA | ||
precacheAndRoute(self.__WB_MANIFEST); | ||
|
||
// Set up App Shell-style routing, so that all navigation requests | ||
// are fulfilled with your index.html shell. Learn more at | ||
// https://developers.google.com/web/fundamentals/architecture/app-shell | ||
const fileExtensionRegexp = new RegExp('/[^/?]+\\.[^/]+$'); | ||
registerRoute( | ||
// Return false to exempt requests from being fulfilled by index.html. | ||
({ request, url }) => { | ||
// If this isn't a navigation, skip. | ||
if (request.mode !== 'navigate') { | ||
return false; | ||
} // If this is a URL that starts with /_, skip. | ||
|
||
if (url.pathname.startsWith('/_')) { | ||
return false; | ||
} // If this looks like a URL for a resource, because it contains // a file extension, skip. | ||
|
||
if (url.pathname.match(fileExtensionRegexp)) { | ||
return false; | ||
} // Return true to signal that we want to use the handler. | ||
|
||
return true; | ||
}, | ||
createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html') | ||
); | ||
|
||
// This allows the web app to trigger skipWaiting via | ||
// registration.waiting.postMessage({type: 'SKIP_WAITING'}) | ||
self.addEventListener('message', (event) => { | ||
if (event.data && event.data.type === 'SKIP_WAITING') { | ||
self.skipWaiting(); | ||
} | ||
}); | ||
|
||
// Any other custom service worker logic can go here. |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
/*global process: true*/ | ||
|
||
const build = process.env.REACT_APP_KOPANO_BUILD || '0.0.0-no-proper-build'; | ||
|
||
export { | ||
|
Oops, something went wrong.