{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular.js/pulls/comments/22887101","id":22887101,"diff_hunk":"@@ -75,6 +75,37 @@ function prepare {\n     replaceJsonProp \"bower.json\" \"angular.*\" \".*\" \"$NEW_VERSION\"\n     replaceJsonProp \"package.json\" \"version\" \".*\" \"$NEW_VERSION\"\n     replaceJsonProp \"package.json\" \"angular.*\" \".*\" \"$NEW_VERSION\"\n+    deleteJsonProp \"package.json\" \"main\"\n+\n+    echo \"-- Adding CommonJS index file\"\n+    echo \"require('./$repo');\" > index.js\n+    echo \"\" >> index.js\n+    if [ $repo == \"angular\" ]\n+    then\n+      echo \"module.exports = angular;\" >> index.js\n+    else\n+      # convert to module names (angular-animate >> ngAnimate)\n+      suffix=`echo $repo | cut -c9-`\n+      first=`echo $suffix | cut -c1 | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`\n+      tail=`echo $suffix | cut -c2-`\n+\n+      if [ $repo != \"angular-mocks\" ]\n+      then\n+        echo \"module.exports = 'ng$first$tail';\" >> index.js\n+      else\n+        echo \"exports.ngMock = 'ngMock';\" >> index.js\n+        echo \"exports.ngMockE2E = 'ngMockE2E';\" >> index.js\n+        echo \"exports.ngAnimateMock = 'ngAnimateMock';\" >> index.js\n+      fi\n+\n+      # add angular as a peer dependency\n+      deleteJsonProp \"package.json\" \"peerDependencies\"\n+      replaceInFile \"package.json\" \"homepage\\\"\\: \\\"http\\:\\/\\/angularjs\\.org\\\"$\" \"homepage\\\"\\: \\\"http\\:\\/\\/angularjs\\.org\\\",\"\n+      sed -i '' -e /^}/d \"package.json\"\n+      # have to use single line form so deleteJsonProp will work\n+      echo \"  \\\"peerDependencies\\\": { \\\"angular\\\": \\\"$NEW_VERSION\\\" }\" >> package.json","path":"scripts/bower/publish.sh","position":32,"original_position":32,"commit_id":"24dfc82f2fdb81684d07968eaf7e90a87fd60121","original_commit_id":"24dfc82f2fdb81684d07968eaf7e90a87fd60121","user":{"login":"bclinkinbeard","id":140343,"avatar_url":"https://avatars.githubusercontent.com/u/140343?v=3","gravatar_id":"","url":"https://api.github.com/users/bclinkinbeard","html_url":"https://github.com/bclinkinbeard","followers_url":"https://api.github.com/users/bclinkinbeard/followers","following_url":"https://api.github.com/users/bclinkinbeard/following{/other_user}","gists_url":"https://api.github.com/users/bclinkinbeard/gists{/gist_id}","starred_url":"https://api.github.com/users/bclinkinbeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bclinkinbeard/subscriptions","organizations_url":"https://api.github.com/users/bclinkinbeard/orgs","repos_url":"https://api.github.com/users/bclinkinbeard/repos","events_url":"https://api.github.com/users/bclinkinbeard/events{/privacy}","received_events_url":"https://api.github.com/users/bclinkinbeard/received_events","type":"User","site_admin":false},"body":"Yea, I mention their problems and uncertain future, but @caitp pointed out that since these would be locked to a specific version we shouldn't have any issues. I'm happy to remove it, but that means devs will need to explicitly install angular itself, along with the other modules they need. (Which seems fine, just pointing out.)","created_at":"2015-01-13T19:27:39Z","updated_at":"2015-01-13T19:27:39Z","html_url":"https://github.com/angular/angular.js/pull/10732#discussion_r22887101","pull_request_url":"https://api.github.com/repos/angular/angular.js/pulls/10732","_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments/22887101"},"html":{"href":"https://github.com/angular/angular.js/pull/10732#discussion_r22887101"},"pull_request":{"href":"https://api.github.com/repos/angular/angular.js/pulls/10732"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular.js/pulls/10732","id":27245263,"html_url":"https://github.com/angular/angular.js/pull/10732","diff_url":"https://github.com/angular/angular.js/pull/10732.diff","patch_url":"https://github.com/angular/angular.js/pull/10732.patch","issue_url":"https://api.github.com/repos/angular/angular.js/issues/10732","number":10732,"state":"open","locked":false,"title":"chore(npm): Make modules Browserify compatible","user":{"login":"bclinkinbeard","id":140343,"avatar_url":"https://avatars.githubusercontent.com/u/140343?v=3","gravatar_id":"","url":"https://api.github.com/users/bclinkinbeard","html_url":"https://github.com/bclinkinbeard","followers_url":"https://api.github.com/users/bclinkinbeard/followers","following_url":"https://api.github.com/users/bclinkinbeard/following{/other_user}","gists_url":"https://api.github.com/users/bclinkinbeard/gists{/gist_id}","starred_url":"https://api.github.com/users/bclinkinbeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bclinkinbeard/subscriptions","organizations_url":"https://api.github.com/users/bclinkinbeard/orgs","repos_url":"https://api.github.com/users/bclinkinbeard/repos","events_url":"https://api.github.com/users/bclinkinbeard/events{/privacy}","received_events_url":"https://api.github.com/users/bclinkinbeard/received_events","type":"User","site_admin":false},"body":"Better version of earlier PR.\r\n\r\nindex.js for angular:\r\n```js\r\nrequire('./angular');\r\n\r\nmodule.exports = angular;\r\n```\r\n\r\nindex.js for other modules:\r\n```js\r\nrequire('./angular-animate');\r\n\r\nmodule.exports = angular.module('ngAnimate');\r\n```\r\n\r\nStill working on adding a dependency to angular in package.json of other modules.","created_at":"2015-01-13T03:08:46Z","updated_at":"2015-01-13T19:27:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular.js/pulls/10732/commits","review_comments_url":"https://api.github.com/repos/angular/angular.js/pulls/10732/comments","review_comment_url":"https://api.github.com/repos/angular/angular.js/pulls/comments/{number}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/10732/comments","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/24dfc82f2fdb81684d07968eaf7e90a87fd60121","head":{"label":"bclinkinbeard:proper-browserify","ref":"proper-browserify","sha":"24dfc82f2fdb81684d07968eaf7e90a87fd60121","user":{"login":"bclinkinbeard","id":140343,"avatar_url":"https://avatars.githubusercontent.com/u/140343?v=3","gravatar_id":"","url":"https://api.github.com/users/bclinkinbeard","html_url":"https://github.com/bclinkinbeard","followers_url":"https://api.github.com/users/bclinkinbeard/followers","following_url":"https://api.github.com/users/bclinkinbeard/following{/other_user}","gists_url":"https://api.github.com/users/bclinkinbeard/gists{/gist_id}","starred_url":"https://api.github.com/users/bclinkinbeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bclinkinbeard/subscriptions","organizations_url":"https://api.github.com/users/bclinkinbeard/orgs","repos_url":"https://api.github.com/users/bclinkinbeard/repos","events_url":"https://api.github.com/users/bclinkinbeard/events{/privacy}","received_events_url":"https://api.github.com/users/bclinkinbeard/received_events","type":"User","site_admin":false},"repo":{"id":19012087,"name":"angular.js","full_name":"bclinkinbeard/angular.js","owner":{"login":"bclinkinbeard","id":140343,"avatar_url":"https://avatars.githubusercontent.com/u/140343?v=3","gravatar_id":"","url":"https://api.github.com/users/bclinkinbeard","html_url":"https://github.com/bclinkinbeard","followers_url":"https://api.github.com/users/bclinkinbeard/followers","following_url":"https://api.github.com/users/bclinkinbeard/following{/other_user}","gists_url":"https://api.github.com/users/bclinkinbeard/gists{/gist_id}","starred_url":"https://api.github.com/users/bclinkinbeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bclinkinbeard/subscriptions","organizations_url":"https://api.github.com/users/bclinkinbeard/orgs","repos_url":"https://api.github.com/users/bclinkinbeard/repos","events_url":"https://api.github.com/users/bclinkinbeard/events{/privacy}","received_events_url":"https://api.github.com/users/bclinkinbeard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bclinkinbeard/angular.js","description":"HTML enhanced for web apps","fork":true,"url":"https://api.github.com/repos/bclinkinbeard/angular.js","forks_url":"https://api.github.com/repos/bclinkinbeard/angular.js/forks","keys_url":"https://api.github.com/repos/bclinkinbeard/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bclinkinbeard/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bclinkinbeard/angular.js/teams","hooks_url":"https://api.github.com/repos/bclinkinbeard/angular.js/hooks","issue_events_url":"https://api.github.com/repos/bclinkinbeard/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/bclinkinbeard/angular.js/events","assignees_url":"https://api.github.com/repos/bclinkinbeard/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/bclinkinbeard/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/bclinkinbeard/angular.js/tags","blobs_url":"https://api.github.com/repos/bclinkinbeard/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bclinkinbeard/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bclinkinbeard/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/bclinkinbeard/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bclinkinbeard/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/bclinkinbeard/angular.js/languages","stargazers_url":"https://api.github.com/repos/bclinkinbeard/angular.js/stargazers","contributors_url":"https://api.github.com/repos/bclinkinbeard/angular.js/contributors","subscribers_url":"https://api.github.com/repos/bclinkinbeard/angular.js/subscribers","subscription_url":"https://api.github.com/repos/bclinkinbeard/angular.js/subscription","commits_url":"https://api.github.com/repos/bclinkinbeard/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/bclinkinbeard/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/bclinkinbeard/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/bclinkinbeard/angular.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/bclinkinbeard/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/bclinkinbeard/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bclinkinbeard/angular.js/merges","archive_url":"https://api.github.com/repos/bclinkinbeard/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bclinkinbeard/angular.js/downloads","issues_url":"https://api.github.com/repos/bclinkinbeard/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/bclinkinbeard/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/bclinkinbeard/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/bclinkinbeard/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bclinkinbeard/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/bclinkinbeard/angular.js/releases{/id}","created_at":"2014-04-22T00:53:36Z","updated_at":"2015-01-12T17:52:46Z","pushed_at":"2015-01-13T14:52:09Z","git_url":"git://github.com/bclinkinbeard/angular.js.git","ssh_url":"git@github.com:bclinkinbeard/angular.js.git","clone_url":"https://github.com/bclinkinbeard/angular.js.git","svn_url":"https://github.com/bclinkinbeard/angular.js","homepage":"http://angularjs.org","size":61379,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"f2e1a930aa5d98f1efe11e0641261762b47a4721","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":460078,"name":"angular.js","full_name":"angular/angular.js","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular.js","description":"HTML enhanced for web apps","fork":false,"url":"https://api.github.com/repos/angular/angular.js","forks_url":"https://api.github.com/repos/angular/angular.js/forks","keys_url":"https://api.github.com/repos/angular/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular.js/teams","hooks_url":"https://api.github.com/repos/angular/angular.js/hooks","issue_events_url":"https://api.github.com/repos/angular/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular.js/events","assignees_url":"https://api.github.com/repos/angular/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular.js/tags","blobs_url":"https://api.github.com/repos/angular/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular.js/languages","stargazers_url":"https://api.github.com/repos/angular/angular.js/stargazers","contributors_url":"https://api.github.com/repos/angular/angular.js/contributors","subscribers_url":"https://api.github.com/repos/angular/angular.js/subscribers","subscription_url":"https://api.github.com/repos/angular/angular.js/subscription","commits_url":"https://api.github.com/repos/angular/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/angular/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular.js/merges","archive_url":"https://api.github.com/repos/angular/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular.js/downloads","issues_url":"https://api.github.com/repos/angular/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular.js/releases{/id}","created_at":"2010-01-06T00:34:37Z","updated_at":"2015-01-13T18:57:22Z","pushed_at":"2015-01-13T01:01:05Z","git_url":"git://github.com/angular/angular.js.git","ssh_url":"git@github.com:angular/angular.js.git","clone_url":"https://github.com/angular/angular.js.git","svn_url":"https://github.com/angular/angular.js","homepage":"http://angularjs.org","size":206284,"stargazers_count":34005,"watchers_count":34005,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13512,"mirror_url":null,"open_issues_count":1129,"forks":13512,"open_issues":1129,"watchers":34005,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/10732"},"html":{"href":"https://github.com/angular/angular.js/pull/10732"},"issue":{"href":"https://api.github.com/repos/angular/angular.js/issues/10732"},"comments":{"href":"https://api.github.com/repos/angular/angular.js/issues/10732/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular.js/pulls/10732/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/angular/angular.js/pulls/10732/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular.js/statuses/24dfc82f2fdb81684d07968eaf7e90a87fd60121"}}}}