{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/comments/70372130","id":70372130,"diff_hunk":"@@ -102,6 +103,13 @@ function generate(params, callback) {\n \n     var relativeUrlToHash = {};\n     var cumulativeSize = 0;\n+    if (\n+      params.stripPrefix !== '' &&\n+      params.replacePrefix !== '' &&\n+      Object.keys(params.stripPrefixMulti).indexOf(params.stripPrefix) === -1","path":"lib/sw-precache.js","position":15,"original_position":15,"commit_id":"a338aedeba378d6b79dcc7d4c060bd66786b967a","original_commit_id":"a338aedeba378d6b79dcc7d4c060bd66786b967a","user":{"login":"jeffposnick","id":1749548,"avatar_url":"https://avatars.githubusercontent.com/u/1749548?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffposnick","html_url":"https://github.com/jeffposnick","followers_url":"https://api.github.com/users/jeffposnick/followers","following_url":"https://api.github.com/users/jeffposnick/following{/other_user}","gists_url":"https://api.github.com/users/jeffposnick/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffposnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffposnick/subscriptions","organizations_url":"https://api.github.com/users/jeffposnick/orgs","repos_url":"https://api.github.com/users/jeffposnick/repos","events_url":"https://api.github.com/users/jeffposnick/events{/privacy}","received_events_url":"https://api.github.com/users/jeffposnick/received_events","type":"User","site_admin":false},"body":"Using `params.stripPrefix in params.stripPrefixMulti` would be more concise.","created_at":"2016-07-12T03:22:40Z","updated_at":"2016-07-12T03:22:40Z","html_url":"https://github.com/GoogleChrome/sw-precache/pull/138#discussion_r70372130","pull_request_url":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/138","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/comments/70372130"},"html":{"href":"https://github.com/GoogleChrome/sw-precache/pull/138#discussion_r70372130"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/138"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/138","id":75730524,"html_url":"https://github.com/GoogleChrome/sw-precache/pull/138","diff_url":"https://github.com/GoogleChrome/sw-precache/pull/138.diff","patch_url":"https://github.com/GoogleChrome/sw-precache/pull/138.patch","issue_url":"https://api.github.com/repos/GoogleChrome/sw-precache/issues/138","number":138,"state":"open","locked":false,"title":"treat stripPrefix as an array to support environments that rewrite paths to another directory","user":{"login":"SignpostMarv","id":304403,"avatar_url":"https://avatars.githubusercontent.com/u/304403?v=3","gravatar_id":"","url":"https://api.github.com/users/SignpostMarv","html_url":"https://github.com/SignpostMarv","followers_url":"https://api.github.com/users/SignpostMarv/followers","following_url":"https://api.github.com/users/SignpostMarv/following{/other_user}","gists_url":"https://api.github.com/users/SignpostMarv/gists{/gist_id}","starred_url":"https://api.github.com/users/SignpostMarv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SignpostMarv/subscriptions","organizations_url":"https://api.github.com/users/SignpostMarv/orgs","repos_url":"https://api.github.com/users/SignpostMarv/repos","events_url":"https://api.github.com/users/SignpostMarv/events{/privacy}","received_events_url":"https://api.github.com/users/SignpostMarv/received_events","type":"User","site_admin":false},"body":"The environment that I'm tinkering in with sw-precache at the moment maps requests to public/foo.txt to public-precached/foo.txt while public/bar.txt is where it says it is;\r\n\r\nExample config:\r\n```json\r\n{\r\n  \"stripPrefix\": [\"www-root/public-precached/\", \"www-root/public/\"],\r\n  \"replacePrefix\": \"public/\",\r\n}\r\n```\r\n\r\nThoughts/comments?","created_at":"2016-06-29T22:10:22Z","updated_at":"2016-07-12T03:22:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40629f6346f4444cddb51363a387f6ad07dc4958","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/138/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/138/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/sw-precache/issues/138/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/sw-precache/statuses/a338aedeba378d6b79dcc7d4c060bd66786b967a","head":{"label":"SignpostMarv:strip-multiple-prefixes","ref":"strip-multiple-prefixes","sha":"a338aedeba378d6b79dcc7d4c060bd66786b967a","user":{"login":"SignpostMarv","id":304403,"avatar_url":"https://avatars.githubusercontent.com/u/304403?v=3","gravatar_id":"","url":"https://api.github.com/users/SignpostMarv","html_url":"https://github.com/SignpostMarv","followers_url":"https://api.github.com/users/SignpostMarv/followers","following_url":"https://api.github.com/users/SignpostMarv/following{/other_user}","gists_url":"https://api.github.com/users/SignpostMarv/gists{/gist_id}","starred_url":"https://api.github.com/users/SignpostMarv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SignpostMarv/subscriptions","organizations_url":"https://api.github.com/users/SignpostMarv/orgs","repos_url":"https://api.github.com/users/SignpostMarv/repos","events_url":"https://api.github.com/users/SignpostMarv/events{/privacy}","received_events_url":"https://api.github.com/users/SignpostMarv/received_events","type":"User","site_admin":false},"repo":{"id":62260319,"name":"sw-precache","full_name":"SignpostMarv/sw-precache","owner":{"login":"SignpostMarv","id":304403,"avatar_url":"https://avatars.githubusercontent.com/u/304403?v=3","gravatar_id":"","url":"https://api.github.com/users/SignpostMarv","html_url":"https://github.com/SignpostMarv","followers_url":"https://api.github.com/users/SignpostMarv/followers","following_url":"https://api.github.com/users/SignpostMarv/following{/other_user}","gists_url":"https://api.github.com/users/SignpostMarv/gists{/gist_id}","starred_url":"https://api.github.com/users/SignpostMarv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SignpostMarv/subscriptions","organizations_url":"https://api.github.com/users/SignpostMarv/orgs","repos_url":"https://api.github.com/users/SignpostMarv/repos","events_url":"https://api.github.com/users/SignpostMarv/events{/privacy}","received_events_url":"https://api.github.com/users/SignpostMarv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SignpostMarv/sw-precache","description":"A node module to generate service worker code that will precache specific resources.","fork":true,"url":"https://api.github.com/repos/SignpostMarv/sw-precache","forks_url":"https://api.github.com/repos/SignpostMarv/sw-precache/forks","keys_url":"https://api.github.com/repos/SignpostMarv/sw-precache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SignpostMarv/sw-precache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SignpostMarv/sw-precache/teams","hooks_url":"https://api.github.com/repos/SignpostMarv/sw-precache/hooks","issue_events_url":"https://api.github.com/repos/SignpostMarv/sw-precache/issues/events{/number}","events_url":"https://api.github.com/repos/SignpostMarv/sw-precache/events","assignees_url":"https://api.github.com/repos/SignpostMarv/sw-precache/assignees{/user}","branches_url":"https://api.github.com/repos/SignpostMarv/sw-precache/branches{/branch}","tags_url":"https://api.github.com/repos/SignpostMarv/sw-precache/tags","blobs_url":"https://api.github.com/repos/SignpostMarv/sw-precache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SignpostMarv/sw-precache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SignpostMarv/sw-precache/git/refs{/sha}","trees_url":"https://api.github.com/repos/SignpostMarv/sw-precache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SignpostMarv/sw-precache/statuses/{sha}","languages_url":"https://api.github.com/repos/SignpostMarv/sw-precache/languages","stargazers_url":"https://api.github.com/repos/SignpostMarv/sw-precache/stargazers","contributors_url":"https://api.github.com/repos/SignpostMarv/sw-precache/contributors","subscribers_url":"https://api.github.com/repos/SignpostMarv/sw-precache/subscribers","subscription_url":"https://api.github.com/repos/SignpostMarv/sw-precache/subscription","commits_url":"https://api.github.com/repos/SignpostMarv/sw-precache/commits{/sha}","git_commits_url":"https://api.github.com/repos/SignpostMarv/sw-precache/git/commits{/sha}","comments_url":"https://api.github.com/repos/SignpostMarv/sw-precache/comments{/number}","issue_comment_url":"https://api.github.com/repos/SignpostMarv/sw-precache/issues/comments{/number}","contents_url":"https://api.github.com/repos/SignpostMarv/sw-precache/contents/{+path}","compare_url":"https://api.github.com/repos/SignpostMarv/sw-precache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SignpostMarv/sw-precache/merges","archive_url":"https://api.github.com/repos/SignpostMarv/sw-precache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SignpostMarv/sw-precache/downloads","issues_url":"https://api.github.com/repos/SignpostMarv/sw-precache/issues{/number}","pulls_url":"https://api.github.com/repos/SignpostMarv/sw-precache/pulls{/number}","milestones_url":"https://api.github.com/repos/SignpostMarv/sw-precache/milestones{/number}","notifications_url":"https://api.github.com/repos/SignpostMarv/sw-precache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SignpostMarv/sw-precache/labels{/name}","releases_url":"https://api.github.com/repos/SignpostMarv/sw-precache/releases{/id}","deployments_url":"https://api.github.com/repos/SignpostMarv/sw-precache/deployments","created_at":"2016-06-29T21:52:06Z","updated_at":"2016-06-29T21:52:07Z","pushed_at":"2016-07-11T18:39:26Z","git_url":"git://github.com/SignpostMarv/sw-precache.git","ssh_url":"git@github.com:SignpostMarv/sw-precache.git","clone_url":"https://github.com/SignpostMarv/sw-precache.git","svn_url":"https://github.com/SignpostMarv/sw-precache","homepage":"","size":443,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleChrome:master","ref":"master","sha":"204b2d099c01b921069332cacf046e7ab0e18fa5","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":28489249,"name":"sw-precache","full_name":"GoogleChrome/sw-precache","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/sw-precache","description":"A node module to generate service worker code that will precache specific resources.","fork":false,"url":"https://api.github.com/repos/GoogleChrome/sw-precache","forks_url":"https://api.github.com/repos/GoogleChrome/sw-precache/forks","keys_url":"https://api.github.com/repos/GoogleChrome/sw-precache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/sw-precache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/sw-precache/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/sw-precache/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/sw-precache/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/sw-precache/events","assignees_url":"https://api.github.com/repos/GoogleChrome/sw-precache/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/sw-precache/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/sw-precache/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/sw-precache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/sw-precache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/sw-precache/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/sw-precache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/sw-precache/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/sw-precache/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/sw-precache/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/sw-precache/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/sw-precache/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/sw-precache/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/sw-precache/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/sw-precache/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/sw-precache/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/sw-precache/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/sw-precache/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/sw-precache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/sw-precache/merges","archive_url":"https://api.github.com/repos/GoogleChrome/sw-precache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/sw-precache/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/sw-precache/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/sw-precache/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/sw-precache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/sw-precache/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/sw-precache/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/sw-precache/deployments","created_at":"2014-12-25T19:15:21Z","updated_at":"2016-07-12T00:51:18Z","pushed_at":"2016-07-11T18:39:27Z","git_url":"git://github.com/GoogleChrome/sw-precache.git","ssh_url":"git@github.com:GoogleChrome/sw-precache.git","clone_url":"https://github.com/GoogleChrome/sw-precache.git","svn_url":"https://github.com/GoogleChrome/sw-precache","homepage":"","size":457,"stargazers_count":1184,"watchers_count":1184,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":88,"mirror_url":null,"open_issues_count":28,"forks":88,"open_issues":28,"watchers":1184,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/138"},"html":{"href":"https://github.com/GoogleChrome/sw-precache/pull/138"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/sw-precache/issues/138"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/sw-precache/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/sw-precache/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/sw-precache/statuses/a338aedeba378d6b79dcc7d4c060bd66786b967a"}}}}
{"actor":{"display_login":"jeffposnick"}}