-
Notifications
You must be signed in to change notification settings - Fork 17
Conversation
@@ -16,6 +16,8 @@ | |||
|
|||
'use strict'; | |||
|
|||
var Promise = require("es6-promise").Promise; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we require Node 0.12 now, Promise should be available already, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, confirmed with @brendandahl
8922e13
to
9a5afdf
Compare
Hi @mykmelez , can you give me a second opinion about the changes? |
// it in the list of files to cache. | ||
try { | ||
fs.unlinkSync(path.join(rootDir, 'offline-worker.js')); | ||
fs.unlinkSync(path.join(rootDir, 'offliner-worker.js')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change should also be reverted.
Adding new templates to integrate offliner. Adding the sw template as well. Changing bootstrap to ignore the sw template and fix Promise import. Promise import fixed for configure as well. es6-promise added to package, added blob as well and removed the use of sw-precache. lib/offline changed to fill the sw template.
Lazy loading offliner-client.js and safeguard.js Offliner included without minifying the files for enabling further optimizations. Modifying the update strategy to reinstall() as soon as the worker has been updated. Modifying the manager to handle updates by reloading the application.
b840bfa
to
0590473
Compare
Hi @mykmelez , what about another round, please? |
gutil.log(gutil.colors.red.bold(file + ' is bigger than 2 MiB. Are you sure you want to cache it? To suppress this warning, explicitly include the file in the fileGlobs list.')); | ||
} | ||
function flatGlobs(fileGlobs) { | ||
return Object.keys(fileGlobs.reduce(function (matchings, fileGlob) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: matchings -> matches
Two other issues:
|
After talking with @mykmelez, we decided to close this issue without merging and I will be writing the service worker we need to address #154 and #5. Apart from the legal issue of making all of public domain, which is a minor problem, the main reason is the functionality covered by offliner is beyond the scope of oghliner v1. Both offliner and oghliner are trying to provide an application lifecycle from different approaches and both need fine-grain control on service workers. My intention integrating offliner was to provide flexibility while avoiding rethink the application lifecycle but for oghliner v1 we want to experiment with a simpler solution more tied to the service worker lifecycle. Thus, to regain full control on the lifecycle, we are writing our own service worker which will provide the precise functionality we want. |
@mykmelez do you want to take a look, please?