# gulp-workbox

> Gulp plugin for injecting workbox manifest.

Latest version **1.0.6** (published 2023-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-workbox
pnpm add gulp-workbox
yarn add gulp-workbox
bun add gulp-workbox
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2023-06-01 |
| First published | 2021-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | MuTsunTsai |
| Maintainers | mutsuntsai |

## Links

- npm: https://www.npmjs.com/package/gulp-workbox
- Repository: https://github.com/MuTsunTsai/gulp-workbox
- Homepage: https://github.com/MuTsunTsai/gulp-workbox#readme
- Issues: https://github.com/MuTsunTsai/gulp-workbox/issues
- npm.io page: https://npm.io/package/gulp-workbox

## Dependencies (1)

- [gulp-through2](https://npm.io/package/gulp-through2.md) ^1.0.1

## Recent versions

- 1.0.6 (latest) — 2023-06-01
- 1.0.5 — 2023-05-30
- 1.0.4 — 2023-05-30
- 1.0.2 — 2021-01-15
- 1.0.1 — 2021-01-15
- 1.0.0 — 2021-01-15

## README

# 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 &copy; Mu-Tsun Tsai 2021

## Install

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

Notice that [workbox-build](https://www.npmjs.com/package/workbox-build) is deliberately installed separately.

## Usage

```javascript
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()`](https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.getManifest) method, plus an optional string `injectionPoint` (whose default value is `"self.__WB_MANIFEST"`);

---
_Source: https://npm.io/package/gulp-workbox · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
