GoogleChromeLabs / sw-toolbox

[Deprecated] A collection of service worker tools for offlining runtime requests
https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
Apache License 2.0
3.62k stars 331 forks source link

missing sw-toolbox.js since 3.5 #228

Closed gdrouet closed 7 years ago

gdrouet commented 7 years ago

I install the sw-toolbox with bower and refer the path bower_components/sw-toolbox/sw-toolbox.js in my importScripts. However the file does not exists in the latest release. When I check the previous releases, the file exists in the 3.4, but has disappeared since 3.5.

jeffposnick commented 7 years ago

Apologies—we've made some changes to our build/publishing process, and it does look like the bower end of things is not working as expected since v3.4.0.

@gauntface, is there any accommodation in the current build process for getting the bundled sw-toolbox.js file checked in to GitHub in a tagged release, to make Bower happy?

(Or is Bower a lost cause at this point?)

gauntface commented 7 years ago

will talk a look at this today. Sorry for the issues :(

gauntface commented 7 years ago

If my understanding is correct. Bower will use the github releases to use as it's "download". The issue with this is that tagging a release will "tag" the source of the project, but the build file sw-toolbox.js is not included because it's in .gitignore.

Going to see if there is a way around this, but I'm not hopeful.

gauntface commented 7 years ago

Yeah anything we do to fix this is going to be horrible.

Sadly I'd vote dropping bower support (Addy is in favor of this) or we just allow build versions back in to master - this will allow it to be in a tag to include the required files.

addyosmani commented 7 years ago

@e111077 I just noticed platinum-sw adding some commits related to this issue :) Do you know whether the plan is to continue using that anywhere? Over on Fizzle, we (incl Taylor) were of the opinion platinum-sw should be deprecated in favor of directly using sw-toolbox and sw-precache.

Would us dropping Bower support here cause any issues for y'all? If so, we can probably keep supporting it for a while longer but are actively trying to focus on npm/yarn support as much as possible otherwise.

e111077 commented 7 years ago

We have decided to deprecate platinum-sw but the team has also decided to port all deprecated elements to the 2.0 "hybrid" mode at the very least. Support will stop there. I have also locked the bower dependency to ~3.4.0

gauntface commented 7 years ago

@addyosmani @jeffposnick shall we just commit the build to master? When I contested the build in master a long time ago, no one called out that bower was using it this way and it happened by chance to work with the old build process. This would at least get Bower running while we finish off sw-helpers.

jeffposnick commented 7 years ago

That sounds fine to me if that's all that it takes to make bower happy.

jeffposnick commented 7 years ago

Apologies for this issue; I've tagged v3.6.1 which includes the built library, so hopefully bower will be happy. It looks okay when I ran bower install sw-toolbox just now.

(@gauntface, I had to manually tag it in GitHub because the publish process won't complete due to https://github.com/GoogleChrome/selenium-assistant/issues/87)