gulp-serviceworker

0.0.3 • Public • Published

gulp-serviceworker

Generate a Service Worker to make your app work offline.

Build Status dependencies devdependencies

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/',
  }));
});

Package Sidebar

Install

npm i gulp-serviceworker

Weekly Downloads

4

Version

0.0.3

License

Apache-2.0

Last publish

Collaborators

  • marco-c