{"action":"created","comment":{"url":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/comments/198995127","pull_request_review_id":133031724,"id":198995127,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODk5NTEyNw==","diff_hunk":"@@ -10,12 +10,12 @@\n     \"build\": \"npm run build-node && npm run build-browser\",\n     \"build-node\": \"npm run build-node-dev\",\n     \"build-browser\": \"npm run build-dev-cjs && npm run build-dev-umd && npm run build-prod-cjs && npm run build-prod-umd\",\n-    \"build-node-dev\": \"webpack lib/index.node.js dist/optimizely.node.js --target=node --output-library-target=commonjs2\",\n-    \"build-node-prod\": \"webpack -p lib/index.node.js dist/optimizely.node.min.js --target=node --output-library-target=commonjs2\",\n-    \"build-dev-cjs\": \"webpack lib/index.browser.js dist/optimizely.browser.cjs.js --output-library-target=commonjs\",\n-    \"build-dev-umd\": \"webpack lib/index.browser.js dist/optimizely.browser.umd.js --output-library=optimizelyClient --output-library-target=umd\",\n-    \"build-prod-cjs\": \"webpack -p lib/index.browser.js dist/optimizely.browser.cjs.min.js --output-library-target=commonjs\",\n-    \"build-prod-umd\": \"webpack -p lib/index.browser.js dist/optimizely.browser.umd.min.js --output-library=optimizelyClient --output-library-target=umd\",\n+    \"build-node-dev\": \"webpack --env.mode=development --env.platform=node --env.targ=cjs\",","path":"packages/optimizely-sdk/package.json","position":10,"original_position":10,"commit_id":"f21d8bfb2ee9d799cc93f8d23766a578e18e6cb7","original_commit_id":"f21d8bfb2ee9d799cc93f8d23766a578e18e6cb7","user":{"login":"spencerwilson-optimizely","id":20175438,"node_id":"MDQ6VXNlcjIwMTc1NDM4","avatar_url":"https://avatars0.githubusercontent.com/u/20175438?v=4","gravatar_id":"","url":"https://api.github.com/users/spencerwilson-optimizely","html_url":"https://github.com/spencerwilson-optimizely","followers_url":"https://api.github.com/users/spencerwilson-optimizely/followers","following_url":"https://api.github.com/users/spencerwilson-optimizely/following{/other_user}","gists_url":"https://api.github.com/users/spencerwilson-optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerwilson-optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerwilson-optimizely/subscriptions","organizations_url":"https://api.github.com/users/spencerwilson-optimizely/orgs","repos_url":"https://api.github.com/users/spencerwilson-optimizely/repos","events_url":"https://api.github.com/users/spencerwilson-optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/spencerwilson-optimizely/received_events","type":"User","site_admin":false},"body":"nit: I'd probably like to rename the env option to `--env.target` rather than `targ`, since abbreviations can add unnecessary complexity.","created_at":"2018-06-28T21:39:43Z","updated_at":"2018-06-28T21:40:08Z","html_url":"https://github.com/optimizely/javascript-sdk/pull/128#discussion_r198995127","pull_request_url":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/128","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/comments/198995127"},"html":{"href":"https://github.com/optimizely/javascript-sdk/pull/128#discussion_r198995127"},"pull_request":{"href":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/128"}}},"pull_request":{"url":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/128","id":197824977,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3ODI0OTc3","html_url":"https://github.com/optimizely/javascript-sdk/pull/128","diff_url":"https://github.com/optimizely/javascript-sdk/pull/128.diff","patch_url":"https://github.com/optimizely/javascript-sdk/pull/128.patch","issue_url":"https://api.github.com/repos/optimizely/javascript-sdk/issues/128","number":128,"state":"open","locked":false,"title":"Patrickshih/webpack.config-file","user":{"login":"shihpatrick","id":25339159,"node_id":"MDQ6VXNlcjI1MzM5MTU5","avatar_url":"https://avatars2.githubusercontent.com/u/25339159?v=4","gravatar_id":"","url":"https://api.github.com/users/shihpatrick","html_url":"https://github.com/shihpatrick","followers_url":"https://api.github.com/users/shihpatrick/followers","following_url":"https://api.github.com/users/shihpatrick/following{/other_user}","gists_url":"https://api.github.com/users/shihpatrick/gists{/gist_id}","starred_url":"https://api.github.com/users/shihpatrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shihpatrick/subscriptions","organizations_url":"https://api.github.com/users/shihpatrick/orgs","repos_url":"https://api.github.com/users/shihpatrick/repos","events_url":"https://api.github.com/users/shihpatrick/events{/privacy}","received_events_url":"https://api.github.com/users/shihpatrick/received_events","type":"User","site_admin":false},"body":"Summary\r\n- \r\n- Rewrote build scripts as a webpack.config.js file\r\n- Changed relevant build scripts to support new config file\r\n- Utilized environmental variables as flags/parameters to separate and specify builds\r\n    - `env.mode = [development | production]`\r\n    - `env.platform = [node | browser]`\r\n    - `env.targ = [cjs | umd]`\r\n- upgraded webpack to 3.x, but could not do webpack 4.x because webpack 4.x does not support node4\r\n\r\nWith a webpack config file, I would be able to simplify the task to add typescript into the Javascript SDK. Also, the config file provides added modularity to the existing codebase. \r\n\r\nTest plan\r\n-\r\n- Ran `npm run build` to ensure that dist/ files were being created\r\n- Built all dist/ files twice (one with webpack.config.js file, one with master) and `diff` each of them\r\n  - Expected: no difference between each file\r\n  - Actual: Some noticeable differences. Discussed with @spencerwilson-optimizely, and the differences could be because of the upgrade from webpack 2.x.x to 4.x.x. Concluded that these differences should not affect the functional outcome. \r\n  - Example of a diff-*.txt file (diff-cjs.txt): \r\n![image](https://user-images.githubusercontent.com/25339159/41993367-1b88f75a-7a00-11e8-864d-560f3a92f9a6.png)\r\n\r\n\r\n\r\n","created_at":"2018-06-27T19:05:41Z","updated_at":"2018-06-28T21:40:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfd24e789b047772f4eb2baf5a7dfcfa6cf2cd31","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/128/commits","review_comments_url":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/128/comments","review_comment_url":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/optimizely/javascript-sdk/issues/128/comments","statuses_url":"https://api.github.com/repos/optimizely/javascript-sdk/statuses/f21d8bfb2ee9d799cc93f8d23766a578e18e6cb7","head":{"label":"optimizely:patrickshih/webpack","ref":"patrickshih/webpack","sha":"f21d8bfb2ee9d799cc93f8d23766a578e18e6cb7","user":{"login":"optimizely","id":1274132,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNzQxMzI=","avatar_url":"https://avatars3.githubusercontent.com/u/1274132?v=4","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"repo":{"id":64253025,"node_id":"MDEwOlJlcG9zaXRvcnk2NDI1MzAyNQ==","name":"javascript-sdk","full_name":"optimizely/javascript-sdk","owner":{"login":"optimizely","id":1274132,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNzQxMzI=","avatar_url":"https://avatars3.githubusercontent.com/u/1274132?v=4","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/optimizely/javascript-sdk","description":null,"fork":false,"url":"https://api.github.com/repos/optimizely/javascript-sdk","forks_url":"https://api.github.com/repos/optimizely/javascript-sdk/forks","keys_url":"https://api.github.com/repos/optimizely/javascript-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/optimizely/javascript-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/optimizely/javascript-sdk/teams","hooks_url":"https://api.github.com/repos/optimizely/javascript-sdk/hooks","issue_events_url":"https://api.github.com/repos/optimizely/javascript-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/optimizely/javascript-sdk/events","assignees_url":"https://api.github.com/repos/optimizely/javascript-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/optimizely/javascript-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/optimizely/javascript-sdk/tags","blobs_url":"https://api.github.com/repos/optimizely/javascript-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/optimizely/javascript-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/optimizely/javascript-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/optimizely/javascript-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/optimizely/javascript-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/optimizely/javascript-sdk/languages","stargazers_url":"https://api.github.com/repos/optimizely/javascript-sdk/stargazers","contributors_url":"https://api.github.com/repos/optimizely/javascript-sdk/contributors","subscribers_url":"https://api.github.com/repos/optimizely/javascript-sdk/subscribers","subscription_url":"https://api.github.com/repos/optimizely/javascript-sdk/subscription","commits_url":"https://api.github.com/repos/optimizely/javascript-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/optimizely/javascript-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/optimizely/javascript-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/optimizely/javascript-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/optimizely/javascript-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/optimizely/javascript-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/optimizely/javascript-sdk/merges","archive_url":"https://api.github.com/repos/optimizely/javascript-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/optimizely/javascript-sdk/downloads","issues_url":"https://api.github.com/repos/optimizely/javascript-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/optimizely/javascript-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/optimizely/javascript-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/optimizely/javascript-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/optimizely/javascript-sdk/labels{/name}","releases_url":"https://api.github.com/repos/optimizely/javascript-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/optimizely/javascript-sdk/deployments","created_at":"2016-07-26T20:40:32Z","updated_at":"2018-06-28T17:16:23Z","pushed_at":"2018-06-28T20:54:07Z","git_url":"git://github.com/optimizely/javascript-sdk.git","ssh_url":"git@github.com:optimizely/javascript-sdk.git","clone_url":"https://github.com/optimizely/javascript-sdk.git","svn_url":"https://github.com/optimizely/javascript-sdk","homepage":null,"size":876,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":8,"open_issues":11,"watchers":15,"default_branch":"master"}},"base":{"label":"optimizely:master","ref":"master","sha":"6d6bb2400fb3adad1ce0d91e0cb6980e68685768","user":{"login":"optimizely","id":1274132,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNzQxMzI=","avatar_url":"https://avatars3.githubusercontent.com/u/1274132?v=4","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"repo":{"id":64253025,"node_id":"MDEwOlJlcG9zaXRvcnk2NDI1MzAyNQ==","name":"javascript-sdk","full_name":"optimizely/javascript-sdk","owner":{"login":"optimizely","id":1274132,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNzQxMzI=","avatar_url":"https://avatars3.githubusercontent.com/u/1274132?v=4","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/optimizely/javascript-sdk","description":null,"fork":false,"url":"https://api.github.com/repos/optimizely/javascript-sdk","forks_url":"https://api.github.com/repos/optimizely/javascript-sdk/forks","keys_url":"https://api.github.com/repos/optimizely/javascript-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/optimizely/javascript-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/optimizely/javascript-sdk/teams","hooks_url":"https://api.github.com/repos/optimizely/javascript-sdk/hooks","issue_events_url":"https://api.github.com/repos/optimizely/javascript-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/optimizely/javascript-sdk/events","assignees_url":"https://api.github.com/repos/optimizely/javascript-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/optimizely/javascript-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/optimizely/javascript-sdk/tags","blobs_url":"https://api.github.com/repos/optimizely/javascript-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/optimizely/javascript-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/optimizely/javascript-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/optimizely/javascript-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/optimizely/javascript-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/optimizely/javascript-sdk/languages","stargazers_url":"https://api.github.com/repos/optimizely/javascript-sdk/stargazers","contributors_url":"https://api.github.com/repos/optimizely/javascript-sdk/contributors","subscribers_url":"https://api.github.com/repos/optimizely/javascript-sdk/subscribers","subscription_url":"https://api.github.com/repos/optimizely/javascript-sdk/subscription","commits_url":"https://api.github.com/repos/optimizely/javascript-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/optimizely/javascript-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/optimizely/javascript-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/optimizely/javascript-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/optimizely/javascript-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/optimizely/javascript-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/optimizely/javascript-sdk/merges","archive_url":"https://api.github.com/repos/optimizely/javascript-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/optimizely/javascript-sdk/downloads","issues_url":"https://api.github.com/repos/optimizely/javascript-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/optimizely/javascript-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/optimizely/javascript-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/optimizely/javascript-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/optimizely/javascript-sdk/labels{/name}","releases_url":"https://api.github.com/repos/optimizely/javascript-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/optimizely/javascript-sdk/deployments","created_at":"2016-07-26T20:40:32Z","updated_at":"2018-06-28T17:16:23Z","pushed_at":"2018-06-28T20:54:07Z","git_url":"git://github.com/optimizely/javascript-sdk.git","ssh_url":"git@github.com:optimizely/javascript-sdk.git","clone_url":"https://github.com/optimizely/javascript-sdk.git","svn_url":"https://github.com/optimizely/javascript-sdk","homepage":null,"size":876,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":8,"open_issues":11,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/128"},"html":{"href":"https://github.com/optimizely/javascript-sdk/pull/128"},"issue":{"href":"https://api.github.com/repos/optimizely/javascript-sdk/issues/128"},"comments":{"href":"https://api.github.com/repos/optimizely/javascript-sdk/issues/128/comments"},"review_comments":{"href":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/128/comments"},"review_comment":{"href":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/optimizely/javascript-sdk/pulls/128/commits"},"statuses":{"href":"https://api.github.com/repos/optimizely/javascript-sdk/statuses/f21d8bfb2ee9d799cc93f8d23766a578e18e6cb7"}},"author_association":"NONE"}}
{"actor":{"display_login":"spencerwilson-optimizely"}}