A Grunt task for generating service workers using sw-precache.
~0.4.5.
bash
$ npm install grunt-sw-precache --save-dev
`
To enable grunt-sw-precache, add the following line to your Gruntfile:
`javascript
grunt.loadNpmTasks('grunt-sw-precache');
`
Configuration
The options documented here are specific to grunt-sw-precache.
For all other options, please view the options documentation for sw-precache.
$3
The base directory for the staticFileGlobs and workerFileName options.
Default is "./dist";
$3
The file name of the generated service worker. This is joined with the baseDir option.
Default is "service-worker.js";
$3
If true, a comment containing a human readable UTC timestamp will be appended to the service worker.
`javascript
/ @preserve Thu, 01 Jan 1970 00:00:00 GMT /
`
Default is true;
$3
The same option as stripPrefix in sw-precache, but has a different default value.
Default is baseDir + '/'`;