exhibit-builder-sw-precache

0.2.0 • Public • Published

sw-precache

Exhibit.js builder plugin

Generates a service worker using the Chrome team’s sw-precache template.

$ npm install -D exhibit-builder-sw-precache

NPM version Build Status Dependency Status devDependency Status peerDependency Status

Usage

  .use('sw-precache', {cacheId: 'foo'})

This looks for cacheable files in your app, and then generates a service-worker.js that will cache those files.

This plugin should go at the end of your build sequence, after all cacheable assets’ contents have been finalized – i.e. after any preprocessors, minifiers, compressers, etc.

Options

include (string/array/function) — default: '**/*.{js,html,css,png,jpg,gif,svg}'

Chooses which files should be included in the service worker cache. Follows Exhibit’s glob convention.

filename (string) — default: 'service-worker.js'

The path for the generated service worker.

Additional options

If set, the following options are used to configure the sw-precache template:


License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i exhibit-builder-sw-precache

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • callumlocke
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy