Skip to content

Commit

Permalink
feat(service-worker): limit max size to cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid committed Jan 17, 2017
1 parent 05fd453 commit 6074a00
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ module.exports = (grunt) ->
baseDir: "<%= config.dist %>"
workerFile: "service-worker.js"
workerDir: "<%= config.dist %><%= config.base %>"
maximumFileSizeToCacheInBytes: "<%= config.cfg.service_worker.max_size %>"
staticFileGlobs: "<%= config.cfg.service_worker.files %>"

usebanner:
Expand Down
1 change: 1 addition & 0 deletions _config.init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ primary_color: "#ff00b4"
# Service Worker Precache
service_worker:
enabled: true
max_size: 120000
files:
- "**/*.{css,html,jpg,gif,png,svg,woff,woff2}"
- "**/js/**.js"
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ colors:
# Service Worker Precache
service_worker:
enabled: true
max_size: 120000
files:
- "**/*.{css,html,jpg,gif,png,svg,woff,woff2}"
- "**/js/**.js"
Expand Down

0 comments on commit 6074a00

Please sign in to comment.