gulp-serviceworker
Generate a Service Worker to make your app work offline.
Usage
The plugin has the following options:
- rootDir: defines the root directory where the resources to be cached are and where the service worker script will be generated.
Example
var gulpServiceWorker = require('gulp-serviceworker'); gulp.task('generate-service-worker', ['build'], function() { return gulp.src(['dist/*']) .pipe(gulpServiceWorker({ rootDir: 'dist/', }));});