1.0.6 • Published 12 months ago

gulp-workbox v1.0.6

Weekly downloads
7
License
MIT
Repository
github
Last release
12 months ago

gulp-workbox

Gulp plugin for injecting workbox manifest.

This plugin is especially useful if you need to build the sw.js first (perhaps by TypeScript) and then inject the manifest in a single flow.

License

MIT © Mu-Tsun Tsai 2021

Install

npm install workbox-build gulp-workbox -save-dev

Notice that workbox-build is deliberately installed separately.

Usage

var gulp = require('gulp');
var workbox = require('gulp-workbox');

gulp.task('build', () =>
	gulp.src('src/sw.js')
		.pipe(workbox({
			globDirectory: 'dist',
			globPatterns: [
				'**/*.htm',
				'**/*.js',
				'**/*.css',
			],
			globIgnores: ['sw.js']
		}))
		.pipe(gulp.dest('dist'))
);

The options are the same as those of the getManifest() method, plus an optional string injectionPoint (whose default value is "self.__WB_MANIFEST");

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago