{"action":"opened","number":296,"pull_request":{"url":"https://api.github.com/repos/DDMAL/diva.js/pulls/296","id":51273420,"html_url":"https://github.com/DDMAL/diva.js/pull/296","diff_url":"https://github.com/DDMAL/diva.js/pull/296.diff","patch_url":"https://github.com/DDMAL/diva.js/pull/296.patch","issue_url":"https://api.github.com/repos/DDMAL/diva.js/issues/296","number":296,"state":"open","locked":false,"title":"Jspm compatibility","user":{"login":"wabain","id":7651435,"avatar_url":"https://avatars.githubusercontent.com/u/7651435?v=3","gravatar_id":"","url":"https://api.github.com/users/wabain","html_url":"https://github.com/wabain","followers_url":"https://api.github.com/users/wabain/followers","following_url":"https://api.github.com/users/wabain/following{/other_user}","gists_url":"https://api.github.com/users/wabain/gists{/gist_id}","starred_url":"https://api.github.com/users/wabain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wabain/subscriptions","organizations_url":"https://api.github.com/users/wabain/orgs","repos_url":"https://api.github.com/users/wabain/repos","events_url":"https://api.github.com/users/wabain/events{/privacy}","received_events_url":"https://api.github.com/users/wabain/received_events","type":"User","site_admin":false},"body":"This PR contains various fixes which makes it easier to use Diva with JavaScript bundlers (particularly JSPM). Much of it is simple, backwards-compatible stuff: adding some configuration, fixing some references to global variables, etc.\r\n\r\nThe changes which might deserve more attention are:\r\n\r\n 1. The build process is changed to wrap all the Diva code in a self-executing function, to make it possible to inject a `require`'d version of jQuery if one is available, instead of relying on jQuery to exist globally.\r\n\r\n 2. As a result of 1, some global variables which Diva used to create are now local, specifically `activeDiva` and `activeDivaController` in `utils.js`. As far as I can tell these didn't need to be global, but maybe something @ahwitz wrote relies on them being there?\r\n\r\n 3. The `diva` variable used to be tacitly global and is now explicitly assigned to the window object. This could theoretically break some kind of build for someone, but probably won't in practice. (Longer term, variables shouldn't be published globally if they can be exported in a module format.)\r\n\r\nPS. The Travis-CI build is broken on develop, so I tested this against the last release on the test-jspm-compatibility branch.","created_at":"2015-11-19T20:05:43Z","updated_at":"2015-11-19T20:05:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DDMAL/diva.js/pulls/296/commits","review_comments_url":"https://api.github.com/repos/DDMAL/diva.js/pulls/296/comments","review_comment_url":"https://api.github.com/repos/DDMAL/diva.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DDMAL/diva.js/issues/296/comments","statuses_url":"https://api.github.com/repos/DDMAL/diva.js/statuses/02c20139e7c7fa7734ce53722b7c424b5e1f3696","head":{"label":"DDMAL:jspm-compatibility","ref":"jspm-compatibility","sha":"02c20139e7c7fa7734ce53722b7c424b5e1f3696","user":{"login":"DDMAL","id":605337,"avatar_url":"https://avatars.githubusercontent.com/u/605337?v=3","gravatar_id":"","url":"https://api.github.com/users/DDMAL","html_url":"https://github.com/DDMAL","followers_url":"https://api.github.com/users/DDMAL/followers","following_url":"https://api.github.com/users/DDMAL/following{/other_user}","gists_url":"https://api.github.com/users/DDMAL/gists{/gist_id}","starred_url":"https://api.github.com/users/DDMAL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDMAL/subscriptions","organizations_url":"https://api.github.com/users/DDMAL/orgs","repos_url":"https://api.github.com/users/DDMAL/repos","events_url":"https://api.github.com/users/DDMAL/events{/privacy}","received_events_url":"https://api.github.com/users/DDMAL/received_events","type":"Organization","site_admin":false},"repo":{"id":1523637,"name":"diva.js","full_name":"DDMAL/diva.js","owner":{"login":"DDMAL","id":605337,"avatar_url":"https://avatars.githubusercontent.com/u/605337?v=3","gravatar_id":"","url":"https://api.github.com/users/DDMAL","html_url":"https://github.com/DDMAL","followers_url":"https://api.github.com/users/DDMAL/followers","following_url":"https://api.github.com/users/DDMAL/following{/other_user}","gists_url":"https://api.github.com/users/DDMAL/gists{/gist_id}","starred_url":"https://api.github.com/users/DDMAL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDMAL/subscriptions","organizations_url":"https://api.github.com/users/DDMAL/orgs","repos_url":"https://api.github.com/users/DDMAL/repos","events_url":"https://api.github.com/users/DDMAL/events{/privacy}","received_events_url":"https://api.github.com/users/DDMAL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DDMAL/diva.js","description":":books: Large Document Image Viewer","fork":false,"url":"https://api.github.com/repos/DDMAL/diva.js","forks_url":"https://api.github.com/repos/DDMAL/diva.js/forks","keys_url":"https://api.github.com/repos/DDMAL/diva.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DDMAL/diva.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DDMAL/diva.js/teams","hooks_url":"https://api.github.com/repos/DDMAL/diva.js/hooks","issue_events_url":"https://api.github.com/repos/DDMAL/diva.js/issues/events{/number}","events_url":"https://api.github.com/repos/DDMAL/diva.js/events","assignees_url":"https://api.github.com/repos/DDMAL/diva.js/assignees{/user}","branches_url":"https://api.github.com/repos/DDMAL/diva.js/branches{/branch}","tags_url":"https://api.github.com/repos/DDMAL/diva.js/tags","blobs_url":"https://api.github.com/repos/DDMAL/diva.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DDMAL/diva.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DDMAL/diva.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/DDMAL/diva.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DDMAL/diva.js/statuses/{sha}","languages_url":"https://api.github.com/repos/DDMAL/diva.js/languages","stargazers_url":"https://api.github.com/repos/DDMAL/diva.js/stargazers","contributors_url":"https://api.github.com/repos/DDMAL/diva.js/contributors","subscribers_url":"https://api.github.com/repos/DDMAL/diva.js/subscribers","subscription_url":"https://api.github.com/repos/DDMAL/diva.js/subscription","commits_url":"https://api.github.com/repos/DDMAL/diva.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/DDMAL/diva.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/DDMAL/diva.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/DDMAL/diva.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/DDMAL/diva.js/contents/{+path}","compare_url":"https://api.github.com/repos/DDMAL/diva.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DDMAL/diva.js/merges","archive_url":"https://api.github.com/repos/DDMAL/diva.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DDMAL/diva.js/downloads","issues_url":"https://api.github.com/repos/DDMAL/diva.js/issues{/number}","pulls_url":"https://api.github.com/repos/DDMAL/diva.js/pulls{/number}","milestones_url":"https://api.github.com/repos/DDMAL/diva.js/milestones{/number}","notifications_url":"https://api.github.com/repos/DDMAL/diva.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DDMAL/diva.js/labels{/name}","releases_url":"https://api.github.com/repos/DDMAL/diva.js/releases{/id}","created_at":"2011-03-25T00:38:23Z","updated_at":"2015-11-18T05:59:01Z","pushed_at":"2015-11-19T20:05:43Z","git_url":"git://github.com/DDMAL/diva.js.git","ssh_url":"git@github.com:DDMAL/diva.js.git","clone_url":"https://github.com/DDMAL/diva.js.git","svn_url":"https://github.com/DDMAL/diva.js","homepage":"http://ddmal.github.io/diva.js","size":37233,"stargazers_count":138,"watchers_count":138,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":21,"mirror_url":null,"open_issues_count":20,"forks":21,"open_issues":20,"watchers":138,"default_branch":"master"}},"base":{"label":"DDMAL:develop","ref":"develop","sha":"3a0f98ce475da8ddd47dd05bf193c7e6efb7fc75","user":{"login":"DDMAL","id":605337,"avatar_url":"https://avatars.githubusercontent.com/u/605337?v=3","gravatar_id":"","url":"https://api.github.com/users/DDMAL","html_url":"https://github.com/DDMAL","followers_url":"https://api.github.com/users/DDMAL/followers","following_url":"https://api.github.com/users/DDMAL/following{/other_user}","gists_url":"https://api.github.com/users/DDMAL/gists{/gist_id}","starred_url":"https://api.github.com/users/DDMAL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDMAL/subscriptions","organizations_url":"https://api.github.com/users/DDMAL/orgs","repos_url":"https://api.github.com/users/DDMAL/repos","events_url":"https://api.github.com/users/DDMAL/events{/privacy}","received_events_url":"https://api.github.com/users/DDMAL/received_events","type":"Organization","site_admin":false},"repo":{"id":1523637,"name":"diva.js","full_name":"DDMAL/diva.js","owner":{"login":"DDMAL","id":605337,"avatar_url":"https://avatars.githubusercontent.com/u/605337?v=3","gravatar_id":"","url":"https://api.github.com/users/DDMAL","html_url":"https://github.com/DDMAL","followers_url":"https://api.github.com/users/DDMAL/followers","following_url":"https://api.github.com/users/DDMAL/following{/other_user}","gists_url":"https://api.github.com/users/DDMAL/gists{/gist_id}","starred_url":"https://api.github.com/users/DDMAL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDMAL/subscriptions","organizations_url":"https://api.github.com/users/DDMAL/orgs","repos_url":"https://api.github.com/users/DDMAL/repos","events_url":"https://api.github.com/users/DDMAL/events{/privacy}","received_events_url":"https://api.github.com/users/DDMAL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DDMAL/diva.js","description":":books: Large Document Image Viewer","fork":false,"url":"https://api.github.com/repos/DDMAL/diva.js","forks_url":"https://api.github.com/repos/DDMAL/diva.js/forks","keys_url":"https://api.github.com/repos/DDMAL/diva.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DDMAL/diva.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DDMAL/diva.js/teams","hooks_url":"https://api.github.com/repos/DDMAL/diva.js/hooks","issue_events_url":"https://api.github.com/repos/DDMAL/diva.js/issues/events{/number}","events_url":"https://api.github.com/repos/DDMAL/diva.js/events","assignees_url":"https://api.github.com/repos/DDMAL/diva.js/assignees{/user}","branches_url":"https://api.github.com/repos/DDMAL/diva.js/branches{/branch}","tags_url":"https://api.github.com/repos/DDMAL/diva.js/tags","blobs_url":"https://api.github.com/repos/DDMAL/diva.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DDMAL/diva.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DDMAL/diva.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/DDMAL/diva.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DDMAL/diva.js/statuses/{sha}","languages_url":"https://api.github.com/repos/DDMAL/diva.js/languages","stargazers_url":"https://api.github.com/repos/DDMAL/diva.js/stargazers","contributors_url":"https://api.github.com/repos/DDMAL/diva.js/contributors","subscribers_url":"https://api.github.com/repos/DDMAL/diva.js/subscribers","subscription_url":"https://api.github.com/repos/DDMAL/diva.js/subscription","commits_url":"https://api.github.com/repos/DDMAL/diva.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/DDMAL/diva.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/DDMAL/diva.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/DDMAL/diva.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/DDMAL/diva.js/contents/{+path}","compare_url":"https://api.github.com/repos/DDMAL/diva.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DDMAL/diva.js/merges","archive_url":"https://api.github.com/repos/DDMAL/diva.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DDMAL/diva.js/downloads","issues_url":"https://api.github.com/repos/DDMAL/diva.js/issues{/number}","pulls_url":"https://api.github.com/repos/DDMAL/diva.js/pulls{/number}","milestones_url":"https://api.github.com/repos/DDMAL/diva.js/milestones{/number}","notifications_url":"https://api.github.com/repos/DDMAL/diva.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DDMAL/diva.js/labels{/name}","releases_url":"https://api.github.com/repos/DDMAL/diva.js/releases{/id}","created_at":"2011-03-25T00:38:23Z","updated_at":"2015-11-18T05:59:01Z","pushed_at":"2015-11-19T20:05:43Z","git_url":"git://github.com/DDMAL/diva.js.git","ssh_url":"git@github.com:DDMAL/diva.js.git","clone_url":"https://github.com/DDMAL/diva.js.git","svn_url":"https://github.com/DDMAL/diva.js","homepage":"http://ddmal.github.io/diva.js","size":37233,"stargazers_count":138,"watchers_count":138,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":21,"mirror_url":null,"open_issues_count":20,"forks":21,"open_issues":20,"watchers":138,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DDMAL/diva.js/pulls/296"},"html":{"href":"https://github.com/DDMAL/diva.js/pull/296"},"issue":{"href":"https://api.github.com/repos/DDMAL/diva.js/issues/296"},"comments":{"href":"https://api.github.com/repos/DDMAL/diva.js/issues/296/comments"},"review_comments":{"href":"https://api.github.com/repos/DDMAL/diva.js/pulls/296/comments"},"review_comment":{"href":"https://api.github.com/repos/DDMAL/diva.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DDMAL/diva.js/pulls/296/commits"},"statuses":{"href":"https://api.github.com/repos/DDMAL/diva.js/statuses/02c20139e7c7fa7734ce53722b7c424b5e1f3696"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":92,"deletions":54,"changed_files":5}}