Skip to content

Commit

Permalink
Updated service workers
Browse files Browse the repository at this point in the history
Optimizations:
• Updated service workers
  • Loading branch information
AlexJSully committed Mar 31, 2022
1 parent 610d73b commit 9ac0a0b
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ cgi-bin/gDriveMountFast.pl
.env.test.local
.env.production.local
.vscode

# workbox
workbox-config.js
2 changes: 1 addition & 1 deletion cgi-bin/core/serviceWorker/sw.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cgi-bin/core/serviceWorker/sw.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cgi-bin/core/serviceWorker/workbox-74df4e21.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion cgi-bin/core/serviceWorker/workbox-ed5f60f5.js.map

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
"description": "Search among 113 RNA-seq data sets used by Araport 11 to reannotate the Arabidopsis genome (Cheng et al. 2016, http://biorxiv.org/content/early/2016/04/05/047308). The eFP-Seq Browser will retrieve the number of reads mapped and display these above the desired Araport 11 gene model. You can sort or filter the columns.",
"main": "index.html",
"scripts": {
"prettier": "prettier --write --end-of-line auto ./"
"prettier": "prettier --write --end-of-line auto ./",
"workbox": "workbox generateSW"
},
"bugs": {
"url": "https://github.com/BioAnalyticResource/eFP-Seq_Browser/issues"
Expand Down
32 changes: 32 additions & 0 deletions workbox-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = {
"globDirectory": "./cgi-bin/",
"globPatterns": [
"**/*.{js,css,png,html,bai,xml,ico,svg,webmanifest,xlsx,jpg,md,json,yml,codepoints,otf,txt,cgi,bed,Rproj,Rmd,webp}"
],
"swDest": "sw.js",
"globIgnores": [
'index.html',
'workbox-config.js',
'package.json',
'package-lock.json'
],

// Define runtime caching rules.
"runtimeCaching": [{
// Match any request that ends with .png, .jpg, .jpeg, .webp, .ico or .svg
"urlPattern": /\.(?:png|jpg|jpeg|webp|ico|svg)$/,

// Apply a cache-first strategy.
"handler": 'CacheFirst',

"options": {
// Use a custom cache name.
"cacheName": 'images',

// Only cache 10 images.
"expiration": {
"maxEntries": 10,
},
},
}],
};

0 comments on commit 9ac0a0b

Please sign in to comment.