{"action":"created","comment":{"url":"https://api.github.com/repos/wprig/wprig/pulls/comments/201157523","pull_request_review_id":135605013,"id":201157523,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTE1NzUyMw==","diff_hunk":"@@ -0,0 +1,48 @@\n+/* eslint-env es6 */\n+'use strict';\n+\n+// External dependencies\n+import requireUncached from 'require-uncached';\n+import browserSync from 'browser-sync';\n+\n+// Internal dependencies\n+import {rootPath} from './constants';\n+\n+/**\n+ * Conditionally set up BrowserSync.\n+ * Only run BrowserSync if config.browserSync.live = true.\n+ */\n+\n+// Create a BrowserSync instance:\n+export const server = browserSync.create();\n+\n+// Initialize the BrowserSync server conditionally:\n+export function serve(done) {\n+    // get a fresh copy of the config\n+    const config = requireUncached(`${rootPath}/dev/config/themeConfig.js`);","path":"gulp/browserSync.js","position":22,"original_position":22,"commit_id":"38e8c269b2de06068d83db10f9c0c84abf44ea75","original_commit_id":"38e8c269b2de06068d83db10f9c0c84abf44ea75","user":{"login":"hellofromtonya","id":7284611,"node_id":"MDQ6VXNlcjcyODQ2MTE=","avatar_url":"https://avatars0.githubusercontent.com/u/7284611?v=4","gravatar_id":"","url":"https://api.github.com/users/hellofromtonya","html_url":"https://github.com/hellofromtonya","followers_url":"https://api.github.com/users/hellofromtonya/followers","following_url":"https://api.github.com/users/hellofromtonya/following{/other_user}","gists_url":"https://api.github.com/users/hellofromtonya/gists{/gist_id}","starred_url":"https://api.github.com/users/hellofromtonya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellofromtonya/subscriptions","organizations_url":"https://api.github.com/users/hellofromtonya/orgs","repos_url":"https://api.github.com/users/hellofromtonya/repos","events_url":"https://api.github.com/users/hellofromtonya/events{/privacy}","received_events_url":"https://api.github.com/users/hellofromtonya/received_events","type":"User","site_admin":false},"body":"Instead of using only the `rootPath`, let's use the `paths.config.themeConfig` here and throughout the scripts.  This strategy let's avoid reuse the paths, i.e. keeping it DRY.\r\n\r\n```\r\nconst config = requireUncached(paths.config.themeConfig);\r\n```","created_at":"2018-07-09T21:46:28Z","updated_at":"2018-07-09T21:55:36Z","html_url":"https://github.com/wprig/wprig/pull/47#discussion_r201157523","pull_request_url":"https://api.github.com/repos/wprig/wprig/pulls/47","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/wprig/wprig/pulls/comments/201157523"},"html":{"href":"https://github.com/wprig/wprig/pull/47#discussion_r201157523"},"pull_request":{"href":"https://api.github.com/repos/wprig/wprig/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/wprig/wprig/pulls/47","id":199812185,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5ODEyMTg1","html_url":"https://github.com/wprig/wprig/pull/47","diff_url":"https://github.com/wprig/wprig/pull/47.diff","patch_url":"https://github.com/wprig/wprig/pull/47.patch","issue_url":"https://api.github.com/repos/wprig/wprig/issues/47","number":47,"state":"open","locked":false,"title":"gulp improvements","user":{"login":"ataylorme","id":2133004,"node_id":"MDQ6VXNlcjIxMzMwMDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2133004?v=4","gravatar_id":"","url":"https://api.github.com/users/ataylorme","html_url":"https://github.com/ataylorme","followers_url":"https://api.github.com/users/ataylorme/followers","following_url":"https://api.github.com/users/ataylorme/following{/other_user}","gists_url":"https://api.github.com/users/ataylorme/gists{/gist_id}","starred_url":"https://api.github.com/users/ataylorme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ataylorme/subscriptions","organizations_url":"https://api.github.com/users/ataylorme/orgs","repos_url":"https://api.github.com/users/ataylorme/repos","events_url":"https://api.github.com/users/ataylorme/events{/privacy}","received_events_url":"https://api.github.com/users/ataylorme/received_events","type":"User","site_admin":false},"body":"## Description\r\nAddresses issue #35 by adding the following gulp improvements\r\n\r\n## List of changes\r\n* Use `gulp-load-plugins` to store gulp plugins in a single variable.\r\n* Use `pump` instead of `pipe`\r\n\t- See the gulp 4.0.0 docs on [why use pump](https://github.com/gulpjs/gulp/tree/master/docs/why-use-pump)\r\n* Split functions in gulpfile.babel.js into separate files\r\n\t- This allows for `gulpfile.babel.js` to simply be a task/workflow manifest and increases readability vs having one monolithic file\r\n* ES6+ Syntax updates\r\n* Use gulp 4 builtin sourcemaps rather than `gulp-sourcemaps`\r\n* Run gulp from `node_modules` in `package.json` scripts\r\n\t- Running the global `gulp` will use the user's local gulp installation which may be a different version than the one we expect.\r\n* Define `rootPath` as `process.env.INIT_CWD` to avoid relative directories parsing from the `gulp` subdirectory\r\n\t- See the [npm run script docs](https://docs.npmjs.com/cli/run-script) and [gulp-cli env docs](https://www.npmjs.com/package/gulp-cli4#environment)\r\n* Add options to gulp-string-replace\r\n\t- Silence `gulp-string-replace` logging each change\r\n\t- Set `gulp-string-replace` search to string from the default of regex as the patterns being used were not regular expressions\r\n\r\n## Checklist:\r\n- [x] This pull request relates to a ticket.\r\n- [x] My code is tested.\r\n- [x] I want my code added to WP Rig.\r\n\r\n**Note:** I tested all gulp functionality manually, there are no automated tests.\r\n","created_at":"2018-07-06T17:57:45Z","updated_at":"2018-07-09T21:55:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a87de28c1d535a6b9ecd581b8fdc54fa831757b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wprig/wprig/pulls/47/commits","review_comments_url":"https://api.github.com/repos/wprig/wprig/pulls/47/comments","review_comment_url":"https://api.github.com/repos/wprig/wprig/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wprig/wprig/issues/47/comments","statuses_url":"https://api.github.com/repos/wprig/wprig/statuses/38e8c269b2de06068d83db10f9c0c84abf44ea75","head":{"label":"ataylorme:issue-35-gulp-improvements","ref":"issue-35-gulp-improvements","sha":"38e8c269b2de06068d83db10f9c0c84abf44ea75","user":{"login":"ataylorme","id":2133004,"node_id":"MDQ6VXNlcjIxMzMwMDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2133004?v=4","gravatar_id":"","url":"https://api.github.com/users/ataylorme","html_url":"https://github.com/ataylorme","followers_url":"https://api.github.com/users/ataylorme/followers","following_url":"https://api.github.com/users/ataylorme/following{/other_user}","gists_url":"https://api.github.com/users/ataylorme/gists{/gist_id}","starred_url":"https://api.github.com/users/ataylorme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ataylorme/subscriptions","organizations_url":"https://api.github.com/users/ataylorme/orgs","repos_url":"https://api.github.com/users/ataylorme/repos","events_url":"https://api.github.com/users/ataylorme/events{/privacy}","received_events_url":"https://api.github.com/users/ataylorme/received_events","type":"User","site_admin":false},"repo":{"id":139892012,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk4OTIwMTI=","name":"wprig","full_name":"ataylorme/wprig","owner":{"login":"ataylorme","id":2133004,"node_id":"MDQ6VXNlcjIxMzMwMDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2133004?v=4","gravatar_id":"","url":"https://api.github.com/users/ataylorme","html_url":"https://github.com/ataylorme","followers_url":"https://api.github.com/users/ataylorme/followers","following_url":"https://api.github.com/users/ataylorme/following{/other_user}","gists_url":"https://api.github.com/users/ataylorme/gists{/gist_id}","starred_url":"https://api.github.com/users/ataylorme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ataylorme/subscriptions","organizations_url":"https://api.github.com/users/ataylorme/orgs","repos_url":"https://api.github.com/users/ataylorme/repos","events_url":"https://api.github.com/users/ataylorme/events{/privacy}","received_events_url":"https://api.github.com/users/ataylorme/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ataylorme/wprig","description":"A progressive theme development rig for WordPress.","fork":true,"url":"https://api.github.com/repos/ataylorme/wprig","forks_url":"https://api.github.com/repos/ataylorme/wprig/forks","keys_url":"https://api.github.com/repos/ataylorme/wprig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ataylorme/wprig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ataylorme/wprig/teams","hooks_url":"https://api.github.com/repos/ataylorme/wprig/hooks","issue_events_url":"https://api.github.com/repos/ataylorme/wprig/issues/events{/number}","events_url":"https://api.github.com/repos/ataylorme/wprig/events","assignees_url":"https://api.github.com/repos/ataylorme/wprig/assignees{/user}","branches_url":"https://api.github.com/repos/ataylorme/wprig/branches{/branch}","tags_url":"https://api.github.com/repos/ataylorme/wprig/tags","blobs_url":"https://api.github.com/repos/ataylorme/wprig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ataylorme/wprig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ataylorme/wprig/git/refs{/sha}","trees_url":"https://api.github.com/repos/ataylorme/wprig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ataylorme/wprig/statuses/{sha}","languages_url":"https://api.github.com/repos/ataylorme/wprig/languages","stargazers_url":"https://api.github.com/repos/ataylorme/wprig/stargazers","contributors_url":"https://api.github.com/repos/ataylorme/wprig/contributors","subscribers_url":"https://api.github.com/repos/ataylorme/wprig/subscribers","subscription_url":"https://api.github.com/repos/ataylorme/wprig/subscription","commits_url":"https://api.github.com/repos/ataylorme/wprig/commits{/sha}","git_commits_url":"https://api.github.com/repos/ataylorme/wprig/git/commits{/sha}","comments_url":"https://api.github.com/repos/ataylorme/wprig/comments{/number}","issue_comment_url":"https://api.github.com/repos/ataylorme/wprig/issues/comments{/number}","contents_url":"https://api.github.com/repos/ataylorme/wprig/contents/{+path}","compare_url":"https://api.github.com/repos/ataylorme/wprig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ataylorme/wprig/merges","archive_url":"https://api.github.com/repos/ataylorme/wprig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ataylorme/wprig/downloads","issues_url":"https://api.github.com/repos/ataylorme/wprig/issues{/number}","pulls_url":"https://api.github.com/repos/ataylorme/wprig/pulls{/number}","milestones_url":"https://api.github.com/repos/ataylorme/wprig/milestones{/number}","notifications_url":"https://api.github.com/repos/ataylorme/wprig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ataylorme/wprig/labels{/name}","releases_url":"https://api.github.com/repos/ataylorme/wprig/releases{/id}","deployments_url":"https://api.github.com/repos/ataylorme/wprig/deployments","created_at":"2018-07-05T19:28:55Z","updated_at":"2018-07-05T19:28:57Z","pushed_at":"2018-07-06T17:51:46Z","git_url":"git://github.com/ataylorme/wprig.git","ssh_url":"git@github.com:ataylorme/wprig.git","clone_url":"https://github.com/ataylorme/wprig.git","svn_url":"https://github.com/ataylorme/wprig","homepage":"https://wprig.io","size":506,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wprig:v1.1","ref":"v1.1","sha":"8bfd9cbe4f7055df2ea7d519666c77803bab1528","user":{"login":"wprig","id":38340689,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MzQwNjg5","avatar_url":"https://avatars0.githubusercontent.com/u/38340689?v=4","gravatar_id":"","url":"https://api.github.com/users/wprig","html_url":"https://github.com/wprig","followers_url":"https://api.github.com/users/wprig/followers","following_url":"https://api.github.com/users/wprig/following{/other_user}","gists_url":"https://api.github.com/users/wprig/gists{/gist_id}","starred_url":"https://api.github.com/users/wprig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wprig/subscriptions","organizations_url":"https://api.github.com/users/wprig/orgs","repos_url":"https://api.github.com/users/wprig/repos","events_url":"https://api.github.com/users/wprig/events{/privacy}","received_events_url":"https://api.github.com/users/wprig/received_events","type":"Organization","site_admin":false},"repo":{"id":133411492,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM0MTE0OTI=","name":"wprig","full_name":"wprig/wprig","owner":{"login":"wprig","id":38340689,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MzQwNjg5","avatar_url":"https://avatars0.githubusercontent.com/u/38340689?v=4","gravatar_id":"","url":"https://api.github.com/users/wprig","html_url":"https://github.com/wprig","followers_url":"https://api.github.com/users/wprig/followers","following_url":"https://api.github.com/users/wprig/following{/other_user}","gists_url":"https://api.github.com/users/wprig/gists{/gist_id}","starred_url":"https://api.github.com/users/wprig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wprig/subscriptions","organizations_url":"https://api.github.com/users/wprig/orgs","repos_url":"https://api.github.com/users/wprig/repos","events_url":"https://api.github.com/users/wprig/events{/privacy}","received_events_url":"https://api.github.com/users/wprig/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wprig/wprig","description":"A progressive theme development rig for WordPress.","fork":false,"url":"https://api.github.com/repos/wprig/wprig","forks_url":"https://api.github.com/repos/wprig/wprig/forks","keys_url":"https://api.github.com/repos/wprig/wprig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wprig/wprig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wprig/wprig/teams","hooks_url":"https://api.github.com/repos/wprig/wprig/hooks","issue_events_url":"https://api.github.com/repos/wprig/wprig/issues/events{/number}","events_url":"https://api.github.com/repos/wprig/wprig/events","assignees_url":"https://api.github.com/repos/wprig/wprig/assignees{/user}","branches_url":"https://api.github.com/repos/wprig/wprig/branches{/branch}","tags_url":"https://api.github.com/repos/wprig/wprig/tags","blobs_url":"https://api.github.com/repos/wprig/wprig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wprig/wprig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wprig/wprig/git/refs{/sha}","trees_url":"https://api.github.com/repos/wprig/wprig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wprig/wprig/statuses/{sha}","languages_url":"https://api.github.com/repos/wprig/wprig/languages","stargazers_url":"https://api.github.com/repos/wprig/wprig/stargazers","contributors_url":"https://api.github.com/repos/wprig/wprig/contributors","subscribers_url":"https://api.github.com/repos/wprig/wprig/subscribers","subscription_url":"https://api.github.com/repos/wprig/wprig/subscription","commits_url":"https://api.github.com/repos/wprig/wprig/commits{/sha}","git_commits_url":"https://api.github.com/repos/wprig/wprig/git/commits{/sha}","comments_url":"https://api.github.com/repos/wprig/wprig/comments{/number}","issue_comment_url":"https://api.github.com/repos/wprig/wprig/issues/comments{/number}","contents_url":"https://api.github.com/repos/wprig/wprig/contents/{+path}","compare_url":"https://api.github.com/repos/wprig/wprig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wprig/wprig/merges","archive_url":"https://api.github.com/repos/wprig/wprig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wprig/wprig/downloads","issues_url":"https://api.github.com/repos/wprig/wprig/issues{/number}","pulls_url":"https://api.github.com/repos/wprig/wprig/pulls{/number}","milestones_url":"https://api.github.com/repos/wprig/wprig/milestones{/number}","notifications_url":"https://api.github.com/repos/wprig/wprig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wprig/wprig/labels{/name}","releases_url":"https://api.github.com/repos/wprig/wprig/releases{/id}","deployments_url":"https://api.github.com/repos/wprig/wprig/deployments","created_at":"2018-05-14T19:29:28Z","updated_at":"2018-07-09T18:04:55Z","pushed_at":"2018-07-07T09:19:32Z","git_url":"git://github.com/wprig/wprig.git","ssh_url":"git@github.com:wprig/wprig.git","clone_url":"https://github.com/wprig/wprig.git","svn_url":"https://github.com/wprig/wprig","homepage":"https://wprig.io","size":257,"stargazers_count":276,"watchers_count":276,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":38,"open_issues":23,"watchers":276,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wprig/wprig/pulls/47"},"html":{"href":"https://github.com/wprig/wprig/pull/47"},"issue":{"href":"https://api.github.com/repos/wprig/wprig/issues/47"},"comments":{"href":"https://api.github.com/repos/wprig/wprig/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/wprig/wprig/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/wprig/wprig/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wprig/wprig/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/wprig/wprig/statuses/38e8c269b2de06068d83db10f9c0c84abf44ea75"}},"author_association":"NONE"}}
{"actor":{"display_login":"hellofromtonya"}}