Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/GreatWizard/ember-service-worker-unregistration
An Ember plugin that unregister service workers when ember-service-worker is disabled.
https://github.com/GreatWizard/ember-service-worker-unregistration
ember-addon ember-service-worker service-worker unregistration
Last synced: 3 months ago
JSON representation
An Ember plugin that unregister service workers when ember-service-worker is disabled.
- Host: GitHub
- URL: https://github.com/GreatWizard/ember-service-worker-unregistration
- Owner: GreatWizard
- License: mit
- Created: 2018-02-01T21:32:24.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-17T13:23:47.000Z (over 6 years ago)
- Last Synced: 2024-04-14T00:42:33.032Z (7 months ago)
- Topics: ember-addon, ember-service-worker, service-worker, unregistration
- Language: JavaScript
- Homepage:
- Size: 272 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ember - ember-service-worker-unregistration - An Ember.js plugin that unregister service workers when ember-service-worker is disabled. (Packages / Service Workers)
README
# Ember Service Worker Unregistration
[![Build Status](https://travis-ci.org/GreatWizard/ember-service-worker-unregistration.svg?branch=master)](https://travis-ci.org/GreatWizard/ember-service-worker-unregistration) [![Ember Observer Score](https://emberobserver.com/badges/ember-service-worker-unregistration.svg)](https://emberobserver.com/addons/ember-service-worker-unregistration)
_An Ember plugin that unregister service workers when ember-service-worker is disabled._
## Installation
```
ember install ember-service-worker-unregistration
```## Configuration
This plugin inject unregistration loop code at the bottom of your `index.html` file.
To unregister all your service workers you just need to disable ember-service-worker.
The configuration is done in the `ember-cli-build.js` file:```js
var EmberApp = require('ember-cli/lib/broccoli/ember-app');module.exports = function(defaults) {
var app = new EmberApp(defaults, {
'ember-service-worker': {
// Disable the Service Worker
enabled: false,
// There are various ways to inject the service worker registration script.
// By default, the unregistration file is loaded using a simple script tag in the bottom of the body tag
// async: the unregistration file is loaded using a async script tag in the bottom of the head tag
// inline: write the contents of the registration script into the index.html file
registrationStrategy: 'inline'
// Force to create the unregistration file
unregistrationEnabled: true
}
});return app.toTree();
};
```## Authors
* [Guillaume Gérard](http://twitter.com/ggerard88)
## Versioning
This library follows [Semantic Versioning](http://semver.org)
## Want to help?
Please do! We are always looking to improve this library. Please see our
[Contribution Guidelines](https://github.com/greatwizard/ember-service-worker-unregistration/blob/master/CONTRIBUTING.md)
on how to properly submit issues and pull requests.## Legal
[Licensed under the MIT license](http://www.opensource.org/licenses/mit-license.php)