sw-pack
v0.1.0
Published
Generate service workers for web-app deployment with offline-first support
Downloads
3
Maintainers
Readme
sw-pack
Generate service workers for web-app deployment with offline-first support.
Only supports node 6+
Usage
const packager = require('sw-pack');
packager.generate({
cache: ['index.html', 'style.css', 'https://example.com/script.js'],
out: './service-worker.js'
});
Features
- Caches files by hash, only updates files which changed
- Does not touch cache which is currently in use
- Can cache external URLs