{"action":"created","comment":{"url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/comments/192396068","pull_request_review_id":125167537,"id":192396068,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjM5NjA2OA==","diff_hunk":"@@ -294,74 +280,22 @@ publish:\n     location: \"js/topojson.v1.min.js\"\n     mimetype: application/javascript\n   -\n-    id: url_hashes\n-    location: \"js/url_hashes.js\"\n-    mimetype: application/javascript\n-  # custom_projection.js must be before build_map.js for it to find the projection function.\n-  -\n-    id: custom_projection\n-    location: \"js/custom_projection.js\"\n+    id: all_minified\n+    location: \"js/all.min.js\"\n     mimetype: application/javascript\n+    publish_args:\n+      js_files: [\n+        \"js/url_hashes.js\", \"js/custom_projection.js\", \"js/styles.js\", \"js/buttons.js\",\n+        \"js/resize.js\", \"js/map_utils.js\", \"js/states.js\", \"js/counties.js\", \"js/watermark.js\", \n+        \"js/circles.js\", \"js/mobile_ui.js\", \"js/modernizr_custom.js\", \"js/lazy_loading.js\", \n+        \"js/national_pie.js\", \"js/rank_states_utils.js\", \"js/scroll_tracking.js\", \"js/build_map_utils.js\"\n+      ]\n+    publisher: combine_minify_js\n+    scripts: [scripts/publish/combine_minify_js.R]\n   -\n     id: build_map","path":"viz.yaml","position":71,"original_position":71,"commit_id":"4b1e450a2af67e6abcde9d1068529692534764e2","original_commit_id":"4b1e450a2af67e6abcde9d1068529692534764e2","user":{"login":"jread-usgs","id":2349007,"node_id":"MDQ6VXNlcjIzNDkwMDc=","avatar_url":"https://avatars2.githubusercontent.com/u/2349007?v=4","gravatar_id":"","url":"https://api.github.com/users/jread-usgs","html_url":"https://github.com/jread-usgs","followers_url":"https://api.github.com/users/jread-usgs/followers","following_url":"https://api.github.com/users/jread-usgs/following{/other_user}","gists_url":"https://api.github.com/users/jread-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/jread-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jread-usgs/subscriptions","organizations_url":"https://api.github.com/users/jread-usgs/orgs","repos_url":"https://api.github.com/users/jread-usgs/repos","events_url":"https://api.github.com/users/jread-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/jread-usgs/received_events","type":"User","site_admin":false},"body":"I realize this is a small script and I understand the reason why this file is separate from the others, but should `build_map` be minified as well?","created_at":"2018-06-01T13:30:31Z","updated_at":"2018-06-01T13:30:32Z","html_url":"https://github.com/USGS-VIZLAB/water-use-15/pull/361#discussion_r192396068","pull_request_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/361","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/comments/192396068"},"html":{"href":"https://github.com/USGS-VIZLAB/water-use-15/pull/361#discussion_r192396068"},"pull_request":{"href":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/361"}}},"pull_request":{"url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/361","id":191869942,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxODY5OTQy","html_url":"https://github.com/USGS-VIZLAB/water-use-15/pull/361","diff_url":"https://github.com/USGS-VIZLAB/water-use-15/pull/361.diff","patch_url":"https://github.com/USGS-VIZLAB/water-use-15/pull/361.patch","issue_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/361","number":361,"state":"open","locked":false,"title":"Uglify test (to new branch)","user":{"login":"lindsaycarr","id":13220910,"node_id":"MDQ6VXNlcjEzMjIwOTEw","avatar_url":"https://avatars3.githubusercontent.com/u/13220910?v=4","gravatar_id":"","url":"https://api.github.com/users/lindsaycarr","html_url":"https://github.com/lindsaycarr","followers_url":"https://api.github.com/users/lindsaycarr/followers","following_url":"https://api.github.com/users/lindsaycarr/following{/other_user}","gists_url":"https://api.github.com/users/lindsaycarr/gists{/gist_id}","starred_url":"https://api.github.com/users/lindsaycarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindsaycarr/subscriptions","organizations_url":"https://api.github.com/users/lindsaycarr/orgs","repos_url":"https://api.github.com/users/lindsaycarr/repos","events_url":"https://api.github.com/users/lindsaycarr/events{/privacy}","received_events_url":"https://api.github.com/users/lindsaycarr/received_events","type":"User","site_admin":false},"body":"Still need to push out to beta and do some performance tests. This creates a publish function that combines all of the js files into one and then minifies it using `js::uglify_optimize`. Combining means we go from loading 18 individual files to 2 (`all.min.js` and `build_map.js`). Minifying brings the combined file from 98 KB to 54 KB. \r\n\r\nThe `build_map.js` script still has to be standalone because it can't be loaded until after divs have been created (I took out some of the functions and put them in a secondary js that was bundled up called `build_map_utils.js`). This is why you see the script tag farther down the page.\r\n\r\nPart of #358.","created_at":"2018-05-31T20:49:30Z","updated_at":"2018-06-01T13:30:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"97217930e915557a166cf785d9b0aec5dbbc686b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/361/commits","review_comments_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/361/comments","review_comment_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/comments{/number}","comments_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/361/comments","statuses_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/statuses/4b1e450a2af67e6abcde9d1068529692534764e2","head":{"label":"lindsaycarr:uglify-test","ref":"uglify-test","sha":"4b1e450a2af67e6abcde9d1068529692534764e2","user":{"login":"lindsaycarr","id":13220910,"node_id":"MDQ6VXNlcjEzMjIwOTEw","avatar_url":"https://avatars3.githubusercontent.com/u/13220910?v=4","gravatar_id":"","url":"https://api.github.com/users/lindsaycarr","html_url":"https://github.com/lindsaycarr","followers_url":"https://api.github.com/users/lindsaycarr/followers","following_url":"https://api.github.com/users/lindsaycarr/following{/other_user}","gists_url":"https://api.github.com/users/lindsaycarr/gists{/gist_id}","starred_url":"https://api.github.com/users/lindsaycarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindsaycarr/subscriptions","organizations_url":"https://api.github.com/users/lindsaycarr/orgs","repos_url":"https://api.github.com/users/lindsaycarr/repos","events_url":"https://api.github.com/users/lindsaycarr/events{/privacy}","received_events_url":"https://api.github.com/users/lindsaycarr/received_events","type":"User","site_admin":false},"repo":{"id":118043584,"node_id":"MDEwOlJlcG9zaXRvcnkxMTgwNDM1ODQ=","name":"water-use-15","full_name":"lindsaycarr/water-use-15","owner":{"login":"lindsaycarr","id":13220910,"node_id":"MDQ6VXNlcjEzMjIwOTEw","avatar_url":"https://avatars3.githubusercontent.com/u/13220910?v=4","gravatar_id":"","url":"https://api.github.com/users/lindsaycarr","html_url":"https://github.com/lindsaycarr","followers_url":"https://api.github.com/users/lindsaycarr/followers","following_url":"https://api.github.com/users/lindsaycarr/following{/other_user}","gists_url":"https://api.github.com/users/lindsaycarr/gists{/gist_id}","starred_url":"https://api.github.com/users/lindsaycarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindsaycarr/subscriptions","organizations_url":"https://api.github.com/users/lindsaycarr/orgs","repos_url":"https://api.github.com/users/lindsaycarr/repos","events_url":"https://api.github.com/users/lindsaycarr/events{/privacy}","received_events_url":"https://api.github.com/users/lindsaycarr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lindsaycarr/water-use-15","description":"USGS water use data visualization emphasizing the newly added 2015 dataset.","fork":true,"url":"https://api.github.com/repos/lindsaycarr/water-use-15","forks_url":"https://api.github.com/repos/lindsaycarr/water-use-15/forks","keys_url":"https://api.github.com/repos/lindsaycarr/water-use-15/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lindsaycarr/water-use-15/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lindsaycarr/water-use-15/teams","hooks_url":"https://api.github.com/repos/lindsaycarr/water-use-15/hooks","issue_events_url":"https://api.github.com/repos/lindsaycarr/water-use-15/issues/events{/number}","events_url":"https://api.github.com/repos/lindsaycarr/water-use-15/events","assignees_url":"https://api.github.com/repos/lindsaycarr/water-use-15/assignees{/user}","branches_url":"https://api.github.com/repos/lindsaycarr/water-use-15/branches{/branch}","tags_url":"https://api.github.com/repos/lindsaycarr/water-use-15/tags","blobs_url":"https://api.github.com/repos/lindsaycarr/water-use-15/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lindsaycarr/water-use-15/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lindsaycarr/water-use-15/git/refs{/sha}","trees_url":"https://api.github.com/repos/lindsaycarr/water-use-15/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lindsaycarr/water-use-15/statuses/{sha}","languages_url":"https://api.github.com/repos/lindsaycarr/water-use-15/languages","stargazers_url":"https://api.github.com/repos/lindsaycarr/water-use-15/stargazers","contributors_url":"https://api.github.com/repos/lindsaycarr/water-use-15/contributors","subscribers_url":"https://api.github.com/repos/lindsaycarr/water-use-15/subscribers","subscription_url":"https://api.github.com/repos/lindsaycarr/water-use-15/subscription","commits_url":"https://api.github.com/repos/lindsaycarr/water-use-15/commits{/sha}","git_commits_url":"https://api.github.com/repos/lindsaycarr/water-use-15/git/commits{/sha}","comments_url":"https://api.github.com/repos/lindsaycarr/water-use-15/comments{/number}","issue_comment_url":"https://api.github.com/repos/lindsaycarr/water-use-15/issues/comments{/number}","contents_url":"https://api.github.com/repos/lindsaycarr/water-use-15/contents/{+path}","compare_url":"https://api.github.com/repos/lindsaycarr/water-use-15/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lindsaycarr/water-use-15/merges","archive_url":"https://api.github.com/repos/lindsaycarr/water-use-15/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lindsaycarr/water-use-15/downloads","issues_url":"https://api.github.com/repos/lindsaycarr/water-use-15/issues{/number}","pulls_url":"https://api.github.com/repos/lindsaycarr/water-use-15/pulls{/number}","milestones_url":"https://api.github.com/repos/lindsaycarr/water-use-15/milestones{/number}","notifications_url":"https://api.github.com/repos/lindsaycarr/water-use-15/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lindsaycarr/water-use-15/labels{/name}","releases_url":"https://api.github.com/repos/lindsaycarr/water-use-15/releases{/id}","deployments_url":"https://api.github.com/repos/lindsaycarr/water-use-15/deployments","created_at":"2018-01-18T22:01:36Z","updated_at":"2018-04-30T01:01:14Z","pushed_at":"2018-05-31T20:48:47Z","git_url":"git://github.com/lindsaycarr/water-use-15.git","ssh_url":"git@github.com:lindsaycarr/water-use-15.git","clone_url":"https://github.com/lindsaycarr/water-use-15.git","svn_url":"https://github.com/lindsaycarr/water-use-15","homepage":null,"size":17680,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"USGS-VIZLAB:uglify-test","ref":"uglify-test","sha":"db696914526a35744bb1bcd28a7ee3e7866cf66a","user":{"login":"USGS-VIZLAB","id":18291557,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MjkxNTU3","avatar_url":"https://avatars2.githubusercontent.com/u/18291557?v=4","gravatar_id":"","url":"https://api.github.com/users/USGS-VIZLAB","html_url":"https://github.com/USGS-VIZLAB","followers_url":"https://api.github.com/users/USGS-VIZLAB/followers","following_url":"https://api.github.com/users/USGS-VIZLAB/following{/other_user}","gists_url":"https://api.github.com/users/USGS-VIZLAB/gists{/gist_id}","starred_url":"https://api.github.com/users/USGS-VIZLAB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/USGS-VIZLAB/subscriptions","organizations_url":"https://api.github.com/users/USGS-VIZLAB/orgs","repos_url":"https://api.github.com/users/USGS-VIZLAB/repos","events_url":"https://api.github.com/users/USGS-VIZLAB/events{/privacy}","received_events_url":"https://api.github.com/users/USGS-VIZLAB/received_events","type":"Organization","site_admin":false},"repo":{"id":118043504,"node_id":"MDEwOlJlcG9zaXRvcnkxMTgwNDM1MDQ=","name":"water-use-15","full_name":"USGS-VIZLAB/water-use-15","owner":{"login":"USGS-VIZLAB","id":18291557,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MjkxNTU3","avatar_url":"https://avatars2.githubusercontent.com/u/18291557?v=4","gravatar_id":"","url":"https://api.github.com/users/USGS-VIZLAB","html_url":"https://github.com/USGS-VIZLAB","followers_url":"https://api.github.com/users/USGS-VIZLAB/followers","following_url":"https://api.github.com/users/USGS-VIZLAB/following{/other_user}","gists_url":"https://api.github.com/users/USGS-VIZLAB/gists{/gist_id}","starred_url":"https://api.github.com/users/USGS-VIZLAB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/USGS-VIZLAB/subscriptions","organizations_url":"https://api.github.com/users/USGS-VIZLAB/orgs","repos_url":"https://api.github.com/users/USGS-VIZLAB/repos","events_url":"https://api.github.com/users/USGS-VIZLAB/events{/privacy}","received_events_url":"https://api.github.com/users/USGS-VIZLAB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/USGS-VIZLAB/water-use-15","description":"USGS water use data visualization emphasizing the newly added 2015 dataset.","fork":false,"url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15","forks_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/forks","keys_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/keys{/key_id}","collaborators_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/teams","hooks_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/hooks","issue_events_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/events{/number}","events_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/events","assignees_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/assignees{/user}","branches_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/branches{/branch}","tags_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/tags","blobs_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/git/refs{/sha}","trees_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/git/trees{/sha}","statuses_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/statuses/{sha}","languages_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/languages","stargazers_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/stargazers","contributors_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/contributors","subscribers_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/subscribers","subscription_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/subscription","commits_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/commits{/sha}","git_commits_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/git/commits{/sha}","comments_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/comments{/number}","issue_comment_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/comments{/number}","contents_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/contents/{+path}","compare_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/compare/{base}...{head}","merges_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/merges","archive_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/downloads","issues_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues{/number}","pulls_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls{/number}","milestones_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/milestones{/number}","notifications_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/labels{/name}","releases_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/releases{/id}","deployments_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/deployments","created_at":"2018-01-18T22:00:40Z","updated_at":"2018-05-29T13:27:26Z","pushed_at":"2018-05-31T20:49:31Z","git_url":"git://github.com/USGS-VIZLAB/water-use-15.git","ssh_url":"git@github.com:USGS-VIZLAB/water-use-15.git","clone_url":"https://github.com/USGS-VIZLAB/water-use-15.git","svn_url":"https://github.com/USGS-VIZLAB/water-use-15","homepage":null,"size":17588,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":26,"license":null,"forks":9,"open_issues":26,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/361"},"html":{"href":"https://github.com/USGS-VIZLAB/water-use-15/pull/361"},"issue":{"href":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/361"},"comments":{"href":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/361/comments"},"review_comments":{"href":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/361/comments"},"review_comment":{"href":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/pulls/361/commits"},"statuses":{"href":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/statuses/4b1e450a2af67e6abcde9d1068529692534764e2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jread-usgs"}}