gulp-sw-cache
Add Offline Cache for WebApp. Submitted by Hom Yan
Usage
First, install gulp-sw-cache
as a dev dependency
npm install gulp-sw-cache --save-dev
Then, include sw.controller.js
in html, and add below to register serviceWorker.
ifcondition
API
Parameters
sw(options)
This controls how this task (and its helpers) operate and should contain key:value pairs, see options below.
options.versionPrefix
Type: String
Default: sw
Add a cache version prefix.
options.exclude
Type: String
Array
Default: undefined
Exclude specific files from the Cache file list.
Usage Example
gulp;