{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/90987526","pull_request_review_id":11499977,"id":90987526,"diff_hunk":"@@ -0,0 +1,142 @@\n+/**\n+ * @license\n+ * Copyright 2016 Google Inc. All rights reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+'use strict';\n+\n+const del = require('del');\n+const gulp = require('gulp');\n+const gulpLoadPlugins = require('gulp-load-plugins');\n+const runSequence = require('run-sequence');\n+const browserify = require('browserify');\n+const closure = require('google-closure-compiler-js').gulp();\n+const ghPages = require('gulp-gh-pages');\n+\n+const $ = gulpLoadPlugins();\n+\n+function license() {\n+  return $.license('Apache', {\n+    organization: 'Copyright 2016 Google Inc. All rights reserved.',\n+    tiny: true\n+  });\n+}\n+\n+function applyBrowserifyTransforms(bundle) {\n+  // Fix an issue with imported speedline code that doesn't brfs well.\n+  return bundle.transform('../lighthouse-extension/fs-transform', {\n+    global: true\n+  }).transform('brfs', {global: true}); // Transform the fs.readFile etc. Do so in all the modules.\n+}\n+\n+gulp.task('lint', () => {\n+  return gulp.src([\n+    'app/src/**/*.js',\n+    'gulpfile.js'\n+  ])\n+  .pipe($.eslint())\n+  .pipe($.eslint.format());\n+});\n+\n+gulp.task('images', () => {\n+  return gulp.src('app/images/**/*')\n+  .pipe(gulp.dest('dist/images'));\n+});\n+\n+gulp.task('css', () => {\n+  return gulp.src([\n+    'app/styles/**/*.css',\n+    '../lighthouse-core/report/styles/report.css'\n+  ])\n+  .pipe(gulp.dest('dist/styles'));\n+});\n+\n+gulp.task('html', () => {\n+  return gulp.src('app/*.html').pipe(gulp.dest('dist'));\n+});\n+\n+gulp.task('browserify', () => {\n+  return gulp.src([\n+    'app/src/main.js'\n+  ], {read: false})\n+    .pipe($.tap(file => {\n+      let bundle = browserify(file.path);\n+      bundle = applyBrowserifyTransforms(bundle);\n+\n+      // Inject transformed browserified content back into our gulp pipeline.\n+      file.contents = bundle.bundle();\n+    }))\n+    .pipe(gulp.dest('dist/src'));\n+});\n+\n+gulp.task('compile', ['browserify'], () => {\n+  return gulp.src([\n+    'dist/src/main.js'\n+  ])\n+    .pipe($.sourcemaps.init())\n+    .pipe(closure({\n+      compilationLevel: 'SIMPLE',\n+      // warningLevel: 'VERBOSE',\n+      // outputWrapper: '(function(){\\n%output%\\n}).call(this)',\n+      // languageOut: 'ECMASCRIPT5',\n+      // processCommonJsModules: true,\n+      jsOutputFile: 'main.js',\n+      createSourceMap: true\n+    }))\n+    .pipe($.uglify()) // Use uglify to strip out duplicated license headers.\n+    .pipe(license())  // Add license to top.\n+    .pipe($.sourcemaps.write('/'))\n+    .pipe(gulp.dest('dist/src'));\n+});\n+\n+gulp.task('clean', () => {\n+  return del(['.tmp', 'dist']).then(paths =>","path":"lighthouse-viewer/gulpfile.js","position":105,"original_position":105,"commit_id":"fd96472d713a734c6b4c17d37b6553a071e794fc","original_commit_id":"37a8d6fb2ad2334cb2c0967155896007b18aef19","user":{"login":"ebidel","id":238208,"avatar_url":"https://avatars.githubusercontent.com/u/238208?v=3","gravatar_id":"","url":"https://api.github.com/users/ebidel","html_url":"https://github.com/ebidel","followers_url":"https://api.github.com/users/ebidel/followers","following_url":"https://api.github.com/users/ebidel/following{/other_user}","gists_url":"https://api.github.com/users/ebidel/gists{/gist_id}","starred_url":"https://api.github.com/users/ebidel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebidel/subscriptions","organizations_url":"https://api.github.com/users/ebidel/orgs","repos_url":"https://api.github.com/users/ebidel/repos","events_url":"https://api.github.com/users/ebidel/events{/privacy}","received_events_url":"https://api.github.com/users/ebidel/received_events","type":"User","site_admin":false},"body":"taken from the extension. Removed.","created_at":"2016-12-06T00:20:49Z","updated_at":"2016-12-06T00:20:49Z","html_url":"https://github.com/GoogleChrome/lighthouse/pull/1109#discussion_r90987526","pull_request_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/1109","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/90987526"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/1109#discussion_r90987526"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/1109"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/1109","id":96570885,"html_url":"https://github.com/GoogleChrome/lighthouse/pull/1109","diff_url":"https://github.com/GoogleChrome/lighthouse/pull/1109.diff","patch_url":"https://github.com/GoogleChrome/lighthouse/pull/1109.patch","issue_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1109","number":1109,"state":"open","locked":false,"title":"Lighthouse Viewer","user":{"login":"ebidel","id":238208,"avatar_url":"https://avatars.githubusercontent.com/u/238208?v=3","gravatar_id":"","url":"https://api.github.com/users/ebidel","html_url":"https://github.com/ebidel","followers_url":"https://api.github.com/users/ebidel/followers","following_url":"https://api.github.com/users/ebidel/following{/other_user}","gists_url":"https://api.github.com/users/ebidel/gists{/gist_id}","starred_url":"https://api.github.com/users/ebidel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebidel/subscriptions","organizations_url":"https://api.github.com/users/ebidel/orgs","repos_url":"https://api.github.com/users/ebidel/repos","events_url":"https://api.github.com/users/ebidel/events{/privacy}","received_events_url":"https://api.github.com/users/ebidel/received_events","type":"User","site_admin":false},"body":"R: all\r\n\r\nThis adds a online viewer for LH json reports, served from `gh-pages`. It browserifies our current report generating code and adds Firebase for authorization to the Github API. Shared reports are saved as gists to Github and fetched later\r\n\r\nTry it: https://ebidel.github.io/viewer-test/\r\n\r\n<img width=\"1126\" alt=\"screen shot 2016-12-05 at 9 12 38 am\" src=\"https://cloud.githubusercontent.com/assets/238208/20894691/4e74d148-bacb-11e6-8fba-99b7469e93a7.png\">\r\n\r\n**Deploys**\r\n\r\ncan be done during a release using `npm run deploy-viewer` in the repo root. That will build `lighthouse-viewer/dist` and push to `gh-pages`. The `dist` folder of LH viewer will be the only thing in the `gh-pages` branch.\r\n\r\nFuture work is tracked in https://github.com/GoogleChrome/lighthouse/issues/1108","created_at":"2016-12-05T17:15:18Z","updated_at":"2016-12-06T00:20:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a90402069dd3140b31f5d568e9780d1314b6cc9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/1109/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/1109/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1109/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/fd96472d713a734c6b4c17d37b6553a071e794fc","head":{"label":"GoogleChrome:viewer","ref":"viewer","sha":"fd96472d713a734c6b4c17d37b6553a071e794fc","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":53370988,"name":"lighthouse","full_name":"GoogleChrome/lighthouse","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/lighthouse","description":"Auditing, performance metrics, and best practices for Progressive Web Apps","fork":false,"url":"https://api.github.com/repos/GoogleChrome/lighthouse","forks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/forks","keys_url":"https://api.github.com/repos/GoogleChrome/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/lighthouse/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/events","assignees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/lighthouse/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/lighthouse/merges","archive_url":"https://api.github.com/repos/GoogleChrome/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/lighthouse/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/deployments","created_at":"2016-03-08T01:03:11Z","updated_at":"2016-12-05T16:37:25Z","pushed_at":"2016-12-05T23:27:44Z","git_url":"git://github.com/GoogleChrome/lighthouse.git","ssh_url":"git@github.com:GoogleChrome/lighthouse.git","clone_url":"https://github.com/GoogleChrome/lighthouse.git","svn_url":"https://github.com/GoogleChrome/lighthouse","homepage":"","size":10994,"stargazers_count":4842,"watchers_count":4842,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":178,"mirror_url":null,"open_issues_count":144,"forks":178,"open_issues":144,"watchers":4842,"default_branch":"master"}},"base":{"label":"GoogleChrome:master","ref":"master","sha":"aa6d38b3ea8b87677e3d1b4b7dfc93c78ed19f44","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":53370988,"name":"lighthouse","full_name":"GoogleChrome/lighthouse","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/lighthouse","description":"Auditing, performance metrics, and best practices for Progressive Web Apps","fork":false,"url":"https://api.github.com/repos/GoogleChrome/lighthouse","forks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/forks","keys_url":"https://api.github.com/repos/GoogleChrome/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/lighthouse/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/events","assignees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/lighthouse/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/lighthouse/merges","archive_url":"https://api.github.com/repos/GoogleChrome/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/lighthouse/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/deployments","created_at":"2016-03-08T01:03:11Z","updated_at":"2016-12-05T16:37:25Z","pushed_at":"2016-12-05T23:27:44Z","git_url":"git://github.com/GoogleChrome/lighthouse.git","ssh_url":"git@github.com:GoogleChrome/lighthouse.git","clone_url":"https://github.com/GoogleChrome/lighthouse.git","svn_url":"https://github.com/GoogleChrome/lighthouse","homepage":"","size":10994,"stargazers_count":4842,"watchers_count":4842,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":178,"mirror_url":null,"open_issues_count":144,"forks":178,"open_issues":144,"watchers":4842,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/1109"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/1109"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1109"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1109/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/1109/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/1109/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/fd96472d713a734c6b4c17d37b6553a071e794fc"}}}}
{"actor":{"display_login":"ebidel"}}