-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies and improve service worker documentation; bump ve…
…rsion to 0.0.18
- Loading branch information
tech_e
committed
Jan 15, 2025
1 parent
b7cba5a
commit bfc22b2
Showing
5 changed files
with
89 additions
and
38 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,38 @@ | ||
importScripts('./worker/cache-controller.js', './worker/service.js'); | ||
|
||
const appName = 'multisplode', | ||
version = '0.0.17'; | ||
/** | ||
* This is the name of the app and the version. This is used to | ||
* create the cache name. | ||
* | ||
* @const | ||
* @type {string} appName | ||
*/ | ||
const APP_NAME = 'multisplode', | ||
|
||
const files = | ||
/** | ||
* This is the version of the app. This is used to create the cache | ||
* | ||
* @const | ||
* @type {string} version | ||
*/ | ||
version = '0.0.18'; | ||
|
||
/** | ||
* This will add these files to cache. Add any files you want to | ||
* cache here. As files are fetched, they will be added to the cache. | ||
* | ||
* @const | ||
* @type {Array<string>} DEFAULT_FILES | ||
*/ | ||
const DEFAULT_FILES = | ||
[ | ||
'./', | ||
'./index.html' | ||
]; | ||
|
||
const appNameId = appName + '-v' + version; | ||
const service = new Service(appNameId, files); | ||
/** | ||
* This will set up the service worker controller with | ||
* the app name and the files to cache. | ||
*/ | ||
const appNameId = `${APP_NAME}-${version}`; | ||
const service = new Service(appNameId, DEFAULT_FILES); |
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