2.1.0 • Published 7 years ago

fly-precache v2.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

fly-precache

Generate a service worker to cache resources and make them available offline.

Install

npm install --save-dev fly-precache

API

.precache(options)

A full list of sw-precache options can be found here.

Usage

Cache assets within the dist directory. This will create a dist/sw directory that contains two dependencies for the dist/service-worker.js.

exports.cache = function * (fly) {
  yield fly.source('dist/**/*.{js,html,css,png,jpg,gif}')
    .precache({
      cacheId: 'my-project-name'
    })
    .target('dist');
}

License

MIT © Luke Edwards

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago