Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Conversation

ccabanero
Copy link
Contributor

… good, updates package.json to run customized build

Description:

The intention of this pull request is to update such that we can add custom caching rules to this app.

This updates the service worker related files in the following way:

  1. updates index.js in how invoke registration of the service worker.
  2. updates registerServiceWorker.js with a more recent version of this same code scaffolded by the CRA CLI - then adds our custom file name.
  3. confirms that sw-build.js looks good to go
  4. confirms that sw-template.js looks good to go
  5. updates package.json to customize the build to use the above.

For more details on the steps - see this Wiki ... https://github.com/spatialdev/react-seafood/wiki/Caching-with-Service-Worker

UI images:

No images.

Unit Test Approach:

No Unit tests - this is service worker scaffolding

Test Results:

Deploy the app - use ChromeDev tools to look at the name of the service worker AND the custom cache names Cole added in the sw-template.js file.

… good, updates package.json to run customized build
@ccabanero ccabanero requested review from danielduhh and cbessee and removed request for danielduhh July 19, 2019 23:01
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"build-sw": "node ./src/sw-build.js",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!!

@danielduhh danielduhh merged commit 3a1158f into development Jul 19, 2019
danielduhh pushed a commit that referenced this pull request Jul 20, 2019
…ate look good, updates package.json to run customized build (#54)"

This reverts commit 3a1158f.
danielduhh pushed a commit that referenced this pull request Jul 20, 2019
* fix reset app bug (#52)

* updates registerServiceWorker, confirms sw-build and sw-template look good, updates package.json to run customized build (#54)

* Geolocate callback & reliable fonts (#56)

* Send the users location to ga on successful locate
Use a more reliable ttf font file

* geolocate callback

* travis

* weird formatting

* no longer need to trigger

* Revert "updates registerServiceWorker, confirms sw-build and sw-template look good, updates package.json to run customized build (#54)"

This reverts commit 3a1158f.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants