{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleChrome/workbox/issues/605","repository_url":"https://api.github.com/repos/GoogleChrome/workbox","labels_url":"https://api.github.com/repos/GoogleChrome/workbox/issues/605/labels{/name}","comments_url":"https://api.github.com/repos/GoogleChrome/workbox/issues/605/comments","events_url":"https://api.github.com/repos/GoogleChrome/workbox/issues/605/events","html_url":"https://github.com/GoogleChrome/workbox/issues/605","id":234283560,"number":605,"title":"Generating a sw, then extending it with importScripts","user":{"login":"johnpapa","id":1202528,"avatar_url":"https://avatars1.githubusercontent.com/u/1202528?v=3","gravatar_id":"","url":"https://api.github.com/users/johnpapa","html_url":"https://github.com/johnpapa","followers_url":"https://api.github.com/users/johnpapa/followers","following_url":"https://api.github.com/users/johnpapa/following{/other_user}","gists_url":"https://api.github.com/users/johnpapa/gists{/gist_id}","starred_url":"https://api.github.com/users/johnpapa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnpapa/subscriptions","organizations_url":"https://api.github.com/users/johnpapa/orgs","repos_url":"https://api.github.com/users/johnpapa/repos","events_url":"https://api.github.com/users/johnpapa/events{/privacy}","received_events_url":"https://api.github.com/users/johnpapa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-07T17:21:56Z","updated_at":"2017-06-07T21:26:39Z","closed_at":null,"body":"**Library Affected**:\r\nworkbox-sw & workbox-build\r\n\r\n**Browser & Platform**:\r\n\"all browsers\"\r\n\r\n**Issue or Feature Request Description**:\r\n**nutshell:** was hoping `importScripts would exist as a setting to `generateSW`\r\n\r\nI am generating a `sw` to take advantage of the pre cache and runtime caching features, instead of manually coding those. The `sw.js` generates well.\r\n\r\nI also have code for background sync and push notifications in a separate file , `sync-and-push.js`. \r\n\r\nI'd like to use `importScripts` at  the end of the generated file to have it run `sync-and-push.js`.  But that feature appears not to exist in `workboxBuild.generateSW(input)`. \r\n\r\nHow can we achieve this?\r\n\r\n\r\nPS - I have a working scenario where I inject the manifest into an existing sw, and this works well. But in this scenario I have to register run time cache routes in code. The above scenario with `generateSW` handles the runtime routes in config, which is just another way of doing it.\r\n\r\ncc @jeffposnick\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GoogleChrome/workbox/issues/comments/306930090","html_url":"https://github.com/GoogleChrome/workbox/issues/605#issuecomment-306930090","issue_url":"https://api.github.com/repos/GoogleChrome/workbox/issues/605","id":306930090,"user":{"login":"gauntface","id":139760,"avatar_url":"https://avatars3.githubusercontent.com/u/139760?v=3","gravatar_id":"","url":"https://api.github.com/users/gauntface","html_url":"https://github.com/gauntface","followers_url":"https://api.github.com/users/gauntface/followers","following_url":"https://api.github.com/users/gauntface/following{/other_user}","gists_url":"https://api.github.com/users/gauntface/gists{/gist_id}","starred_url":"https://api.github.com/users/gauntface/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauntface/subscriptions","organizations_url":"https://api.github.com/users/gauntface/orgs","repos_url":"https://api.github.com/users/gauntface/repos","events_url":"https://api.github.com/users/gauntface/events{/privacy}","received_events_url":"https://api.github.com/users/gauntface/received_events","type":"User","site_admin":false},"created_at":"2017-06-07T21:26:39Z","updated_at":"2017-06-07T21:26:39Z","body":"Personally I wouldn't want to add this feature.\r\n\r\nIf a developer doesn't revision their importScripts, there is no guarantee it's going to be updated when the file changes (Yes this behaviour will change in the future, but I'm not sure of status in Chrome or other browsers).\r\n\r\nInstead the inject manifest is the way that I'd like to see developer go down."}}
{"actor":{"display_login":"gauntface"}}