Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shipshapecode/ember-service-worker-prember
An Ember Service Worker plugin that caches the index.html files for each prember route
https://github.com/shipshapecode/ember-service-worker-prember
ember ember-addon emberjs prember
Last synced: 18 days ago
JSON representation
An Ember Service Worker plugin that caches the index.html files for each prember route
- Host: GitHub
- URL: https://github.com/shipshapecode/ember-service-worker-prember
- Owner: shipshapecode
- License: mit
- Created: 2018-01-30T20:30:59.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-08T04:19:57.000Z (almost 6 years ago)
- Last Synced: 2024-10-07T23:11:20.267Z (29 days ago)
- Topics: ember, ember-addon, emberjs, prember
- Language: JavaScript
- Size: 123 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ember - ember-service-worker-prember - An Ember.js Service Worker plugin that caches the index.html files for each prember route. (Packages / Service Workers)
README
# ember-service-worker-prember
**[ember-service-worker-prember is built and maintained by Ship Shape. Contact us for Ember.js consulting, development, and training for your project](https://shipshape.io/ember-consulting/)**.
[![npm version](https://badge.fury.io/js/ember-service-worker-prember.svg)](http://badge.fury.io/js/ember-service-worker-prember)
An Ember Service Worker plugin that caches the html files from your static Ember app generated by [prember](https://github.com/ef4/prember)
## F#$& my assets aren't updating in development mode
Turn on the "Update on reload" setting in the `Application > Service Workers`
menu in the Chrome devtools.## Installation
```
ember install ember-service-worker
ember install ember-service-worker-prember
```## Configuration
Configuration is optional. You should not need to manually bust the cache.
This addon now finds all `index.html` files and makes a hash of the contents.
It will constantly check if this hash gets out of date, and switch the files for you.
If things seem to be broken, you can try manually bumping the version.```js
var EmberApp = require('ember-cli/lib/broccoli/ember-app');module.exports = function(defaults) {
var app = new EmberApp(defaults, {
'esw-prember': {
// Changing this version number will bust the cache, but you probably do not
// want to be doing this manually, but rather using `versionStrategy` as
// explained here http://ember-service-worker.com/documentation/configuration/#versioning
version: '1'
}
});return app.toTree();
};
```License
------------------------------------------------------------------------------This project is licensed under the [MIT License](LICENSE.md).