{"action":"created","comment":{"url":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/comments/234622019","pull_request_review_id":176300566,"id":234622019,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDYyMjAxOQ==","diff_hunk":"@@ -8,7 +8,10 @@ checkDir('dist').then(hasDist => {\n   if (!hasDist) {\n     fs.mkdirSync('dist');\n   }\n-  if (process.argv.length < 3) {\n+  if (process.argv.includes('watch')) {\n+    process.argv = [ process.argv[0], process.argv[1], '--watch', 'src', '--out-dir', 'dist/lib', ];","path":"packages/libs/htz-react-base/scripts/build/lib.js","position":null,"original_position":6,"commit_id":"1719a6bde28efbcf4e6b38643114a59601296d71","original_commit_id":"74d900f31d8634ec2840edf31b1cf9e2269cc934","user":{"login":"TxHawks","id":5658514,"node_id":"MDQ6VXNlcjU2NTg1MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5658514?v=4","gravatar_id":"","url":"https://api.github.com/users/TxHawks","html_url":"https://github.com/TxHawks","followers_url":"https://api.github.com/users/TxHawks/followers","following_url":"https://api.github.com/users/TxHawks/following{/other_user}","gists_url":"https://api.github.com/users/TxHawks/gists{/gist_id}","starred_url":"https://api.github.com/users/TxHawks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TxHawks/subscriptions","organizations_url":"https://api.github.com/users/TxHawks/orgs","repos_url":"https://api.github.com/users/TxHawks/repos","events_url":"https://api.github.com/users/TxHawks/events{/privacy}","received_events_url":"https://api.github.com/users/TxHawks/received_events","type":"User","site_admin":false},"body":"The way you did it doesn't let us override default arguments like `--source-maps` when passing `watch`.\r\n\r\nTry something like this:\r\n\r\n```js\r\nconst { argv, } = argv;\r\n// user did not pass any arguments\r\nif (argv.length < 3) {\r\n  argv.push('src', '--source-maps', '--out-dir', 'dist/lib');\r\n}\r\n// User passed arguments, and we need to check if `watch` is one of them\r\nelse {\r\n  const watchIndex = argv.indexOf('watch');\r\n  const hasWatch = watchIndex !== -1;\r\n\r\n  if (hasWatch) {\r\n    argv[watchindex] = '--watch';\r\n\r\n    // User only passed the `watch` argument, add defaults\r\n    if (argv.length < 4) {\r\n      argv.push(\r\n        '--source-maps',\r\n        'src',\r\n        '--out-dir',\r\n        'dist/lib'\r\n     ); \r\n    }\r\n  }\r\n}\r\n```\r\n\r\nBut again, I didn't test this, so please validate that it works as expected","created_at":"2018-11-19T13:44:30Z","updated_at":"2018-11-19T13:44:30Z","html_url":"https://github.com/Haaretz/htz-frontend/pull/1133#discussion_r234622019","pull_request_url":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/1133","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/comments/234622019"},"html":{"href":"https://github.com/Haaretz/htz-frontend/pull/1133#discussion_r234622019"},"pull_request":{"href":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/1133"}},"in_reply_to_id":234445684},"pull_request":{"url":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/1133","id":231783579,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNzgzNTc5","html_url":"https://github.com/Haaretz/htz-frontend/pull/1133","diff_url":"https://github.com/Haaretz/htz-frontend/pull/1133.diff","patch_url":"https://github.com/Haaretz/htz-frontend/pull/1133.patch","issue_url":"https://api.github.com/repos/Haaretz/htz-frontend/issues/1133","number":1133,"state":"open","locked":false,"title":"feat(watch): add watch command to packages for better dx","user":{"login":"yehudagoldner","id":2182058,"node_id":"MDQ6VXNlcjIxODIwNTg=","avatar_url":"https://avatars3.githubusercontent.com/u/2182058?v=4","gravatar_id":"","url":"https://api.github.com/users/yehudagoldner","html_url":"https://github.com/yehudagoldner","followers_url":"https://api.github.com/users/yehudagoldner/followers","following_url":"https://api.github.com/users/yehudagoldner/following{/other_user}","gists_url":"https://api.github.com/users/yehudagoldner/gists{/gist_id}","starred_url":"https://api.github.com/users/yehudagoldner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yehudagoldner/subscriptions","organizations_url":"https://api.github.com/users/yehudagoldner/orgs","repos_url":"https://api.github.com/users/yehudagoldner/repos","events_url":"https://api.github.com/users/yehudagoldner/events{/privacy}","received_events_url":"https://api.github.com/users/yehudagoldner/received_events","type":"User","site_admin":false},"body":"affects: @haaretz/haaretz.co.il, @haaretz/htz-components, @haaretz/htz-theme, @haaretz/tm-theme,\r\n@haaretz/app-utils, @haaretz/d3-server, @haaretz/dfp, @haaretz/fela-utils, @haaretz/graphql-server,\r\n@haaretz/htz-css-tools, @haaretz/htz-react-base, @haaretz/htz-react-server, @haaretz/htz-user-utils\r\n\r\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\r\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\r\n**Table of Contents**\r\n\r\n- [Description](#description)\r\n- [Checklist](#checklist)\r\n\r\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\r\n\r\n**Related issue(s):** #0\r\n\r\n## Description\r\n<!-- Technical description of the task -->\r\n\r\n\r\n<!-- Delete if none -->\r\n**Notes:**\r\n<!-- Extra notes on implementation, concerns, things to notice in review -->\r\n\r\n\r\n## Checklist\r\n\r\nDesign:\r\n  * [ ] Approved by designer\r\n\r\nUsability:\r\n  * [ ] Developer\r\n  * [ ] Project manager\r\n\r\nTests\r\n  <!-- remove irrelevant (but not incompolete) entries -->\r\n  * [ ] UI snapshot testing \r\n  * [ ] Unit testing\r\n  * [ ] Integration testing\r\n  * [ ] E2E testing\r\n","created_at":"2018-11-18T11:51:48Z","updated_at":"2018-11-19T13:44:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df2cb7301926b49f5b3b0d269004917cb6590f4e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/1133/commits","review_comments_url":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/1133/comments","review_comment_url":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Haaretz/htz-frontend/issues/1133/comments","statuses_url":"https://api.github.com/repos/Haaretz/htz-frontend/statuses/1719a6bde28efbcf4e6b38643114a59601296d71","head":{"label":"Haaretz:fast-build","ref":"fast-build","sha":"1719a6bde28efbcf4e6b38643114a59601296d71","user":{"login":"Haaretz","id":12641584,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjQxNTg0","avatar_url":"https://avatars1.githubusercontent.com/u/12641584?v=4","gravatar_id":"","url":"https://api.github.com/users/Haaretz","html_url":"https://github.com/Haaretz","followers_url":"https://api.github.com/users/Haaretz/followers","following_url":"https://api.github.com/users/Haaretz/following{/other_user}","gists_url":"https://api.github.com/users/Haaretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Haaretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haaretz/subscriptions","organizations_url":"https://api.github.com/users/Haaretz/orgs","repos_url":"https://api.github.com/users/Haaretz/repos","events_url":"https://api.github.com/users/Haaretz/events{/privacy}","received_events_url":"https://api.github.com/users/Haaretz/received_events","type":"Organization","site_admin":false},"repo":{"id":101068622,"node_id":"MDEwOlJlcG9zaXRvcnkxMDEwNjg2MjI=","name":"htz-frontend","full_name":"Haaretz/htz-frontend","private":false,"owner":{"login":"Haaretz","id":12641584,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjQxNTg0","avatar_url":"https://avatars1.githubusercontent.com/u/12641584?v=4","gravatar_id":"","url":"https://api.github.com/users/Haaretz","html_url":"https://github.com/Haaretz","followers_url":"https://api.github.com/users/Haaretz/followers","following_url":"https://api.github.com/users/Haaretz/following{/other_user}","gists_url":"https://api.github.com/users/Haaretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Haaretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haaretz/subscriptions","organizations_url":"https://api.github.com/users/Haaretz/orgs","repos_url":"https://api.github.com/users/Haaretz/repos","events_url":"https://api.github.com/users/Haaretz/events{/privacy}","received_events_url":"https://api.github.com/users/Haaretz/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Haaretz/htz-frontend","description":"Source for Haaretz frontend app(s)","fork":false,"url":"https://api.github.com/repos/Haaretz/htz-frontend","forks_url":"https://api.github.com/repos/Haaretz/htz-frontend/forks","keys_url":"https://api.github.com/repos/Haaretz/htz-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Haaretz/htz-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Haaretz/htz-frontend/teams","hooks_url":"https://api.github.com/repos/Haaretz/htz-frontend/hooks","issue_events_url":"https://api.github.com/repos/Haaretz/htz-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/Haaretz/htz-frontend/events","assignees_url":"https://api.github.com/repos/Haaretz/htz-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/Haaretz/htz-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/Haaretz/htz-frontend/tags","blobs_url":"https://api.github.com/repos/Haaretz/htz-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Haaretz/htz-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Haaretz/htz-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Haaretz/htz-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Haaretz/htz-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/Haaretz/htz-frontend/languages","stargazers_url":"https://api.github.com/repos/Haaretz/htz-frontend/stargazers","contributors_url":"https://api.github.com/repos/Haaretz/htz-frontend/contributors","subscribers_url":"https://api.github.com/repos/Haaretz/htz-frontend/subscribers","subscription_url":"https://api.github.com/repos/Haaretz/htz-frontend/subscription","commits_url":"https://api.github.com/repos/Haaretz/htz-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Haaretz/htz-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Haaretz/htz-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Haaretz/htz-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Haaretz/htz-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/Haaretz/htz-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Haaretz/htz-frontend/merges","archive_url":"https://api.github.com/repos/Haaretz/htz-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Haaretz/htz-frontend/downloads","issues_url":"https://api.github.com/repos/Haaretz/htz-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/Haaretz/htz-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/Haaretz/htz-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/Haaretz/htz-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Haaretz/htz-frontend/labels{/name}","releases_url":"https://api.github.com/repos/Haaretz/htz-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/Haaretz/htz-frontend/deployments","created_at":"2017-08-22T13:55:37Z","updated_at":"2018-11-19T09:32:46Z","pushed_at":"2018-11-19T13:20:13Z","git_url":"git://github.com/Haaretz/htz-frontend.git","ssh_url":"git@github.com:Haaretz/htz-frontend.git","clone_url":"https://github.com/Haaretz/htz-frontend.git","svn_url":"https://github.com/Haaretz/htz-frontend","homepage":"https://haaretz.github.io/htz-frontend/docs","size":16861,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":236,"license":null,"forks":2,"open_issues":236,"watchers":5,"default_branch":"master"}},"base":{"label":"Haaretz:master","ref":"master","sha":"76831701f5651ade53f6ab9b3792c03a1335ea6e","user":{"login":"Haaretz","id":12641584,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjQxNTg0","avatar_url":"https://avatars1.githubusercontent.com/u/12641584?v=4","gravatar_id":"","url":"https://api.github.com/users/Haaretz","html_url":"https://github.com/Haaretz","followers_url":"https://api.github.com/users/Haaretz/followers","following_url":"https://api.github.com/users/Haaretz/following{/other_user}","gists_url":"https://api.github.com/users/Haaretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Haaretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haaretz/subscriptions","organizations_url":"https://api.github.com/users/Haaretz/orgs","repos_url":"https://api.github.com/users/Haaretz/repos","events_url":"https://api.github.com/users/Haaretz/events{/privacy}","received_events_url":"https://api.github.com/users/Haaretz/received_events","type":"Organization","site_admin":false},"repo":{"id":101068622,"node_id":"MDEwOlJlcG9zaXRvcnkxMDEwNjg2MjI=","name":"htz-frontend","full_name":"Haaretz/htz-frontend","private":false,"owner":{"login":"Haaretz","id":12641584,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjQxNTg0","avatar_url":"https://avatars1.githubusercontent.com/u/12641584?v=4","gravatar_id":"","url":"https://api.github.com/users/Haaretz","html_url":"https://github.com/Haaretz","followers_url":"https://api.github.com/users/Haaretz/followers","following_url":"https://api.github.com/users/Haaretz/following{/other_user}","gists_url":"https://api.github.com/users/Haaretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Haaretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haaretz/subscriptions","organizations_url":"https://api.github.com/users/Haaretz/orgs","repos_url":"https://api.github.com/users/Haaretz/repos","events_url":"https://api.github.com/users/Haaretz/events{/privacy}","received_events_url":"https://api.github.com/users/Haaretz/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Haaretz/htz-frontend","description":"Source for Haaretz frontend app(s)","fork":false,"url":"https://api.github.com/repos/Haaretz/htz-frontend","forks_url":"https://api.github.com/repos/Haaretz/htz-frontend/forks","keys_url":"https://api.github.com/repos/Haaretz/htz-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Haaretz/htz-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Haaretz/htz-frontend/teams","hooks_url":"https://api.github.com/repos/Haaretz/htz-frontend/hooks","issue_events_url":"https://api.github.com/repos/Haaretz/htz-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/Haaretz/htz-frontend/events","assignees_url":"https://api.github.com/repos/Haaretz/htz-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/Haaretz/htz-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/Haaretz/htz-frontend/tags","blobs_url":"https://api.github.com/repos/Haaretz/htz-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Haaretz/htz-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Haaretz/htz-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Haaretz/htz-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Haaretz/htz-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/Haaretz/htz-frontend/languages","stargazers_url":"https://api.github.com/repos/Haaretz/htz-frontend/stargazers","contributors_url":"https://api.github.com/repos/Haaretz/htz-frontend/contributors","subscribers_url":"https://api.github.com/repos/Haaretz/htz-frontend/subscribers","subscription_url":"https://api.github.com/repos/Haaretz/htz-frontend/subscription","commits_url":"https://api.github.com/repos/Haaretz/htz-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Haaretz/htz-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Haaretz/htz-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Haaretz/htz-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Haaretz/htz-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/Haaretz/htz-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Haaretz/htz-frontend/merges","archive_url":"https://api.github.com/repos/Haaretz/htz-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Haaretz/htz-frontend/downloads","issues_url":"https://api.github.com/repos/Haaretz/htz-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/Haaretz/htz-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/Haaretz/htz-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/Haaretz/htz-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Haaretz/htz-frontend/labels{/name}","releases_url":"https://api.github.com/repos/Haaretz/htz-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/Haaretz/htz-frontend/deployments","created_at":"2017-08-22T13:55:37Z","updated_at":"2018-11-19T09:32:46Z","pushed_at":"2018-11-19T13:20:13Z","git_url":"git://github.com/Haaretz/htz-frontend.git","ssh_url":"git@github.com:Haaretz/htz-frontend.git","clone_url":"https://github.com/Haaretz/htz-frontend.git","svn_url":"https://github.com/Haaretz/htz-frontend","homepage":"https://haaretz.github.io/htz-frontend/docs","size":16861,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":236,"license":null,"forks":2,"open_issues":236,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/1133"},"html":{"href":"https://github.com/Haaretz/htz-frontend/pull/1133"},"issue":{"href":"https://api.github.com/repos/Haaretz/htz-frontend/issues/1133"},"comments":{"href":"https://api.github.com/repos/Haaretz/htz-frontend/issues/1133/comments"},"review_comments":{"href":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/1133/comments"},"review_comment":{"href":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Haaretz/htz-frontend/pulls/1133/commits"},"statuses":{"href":"https://api.github.com/repos/Haaretz/htz-frontend/statuses/1719a6bde28efbcf4e6b38643114a59601296d71"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"TxHawks"}}