Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justeat/f-serviceworker
https://github.com/justeat/f-serviceworker
fozzie ui
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/justeat/f-serviceworker
- Owner: justeat
- License: other
- Created: 2017-06-05T14:15:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-23T10:22:20.000Z (over 6 years ago)
- Last Synced: 2024-10-31T17:58:28.407Z (about 2 months ago)
- Topics: fozzie, ui
- Language: JavaScript
- Size: 188 KB
- Stars: 1
- Watchers: 42
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# f-serviceworker :bear:
[![npm version](https://badge.fury.io/js/%40justeat%2Ff-serviceworker.svg)](https://badge.fury.io/js/%40justeat%2Ff-serviceworker)
[![Build Status](https://travis-ci.org/justeat/f-serviceworker.svg)](https://travis-ci.org/justeat/f-serviceworker)
[![install size](https://packagephobia.now.sh/badge?p=@justeat/f-serviceworker)](https://packagephobia.now.sh/result?p=@justeat/f-serviceworker)Contains the registration script for `service-worker.js` located in the root of your website.
```javascript
const sw = require('@justeat/f-serviceworker');
sw.register();
```on all pages that should be managed by the service worker.
Optional configuration object can be passed containing the service-worker.js path. Defaults to /service-worker.js
```javascript
Sw.register({ swPath: '/subdir/service-worker.js' });
```