{"action":"created","issue":{"url":"https://api.github.com/repos/hypothesis/h/issues/2092","labels_url":"https://api.github.com/repos/hypothesis/h/issues/2092/labels{/name}","comments_url":"https://api.github.com/repos/hypothesis/h/issues/2092/comments","events_url":"https://api.github.com/repos/hypothesis/h/issues/2092/events","html_url":"https://github.com/hypothesis/h/pull/2092","id":64351859,"number":2092,"title":"Improve packaging, bundling and module boilerplate","user":{"login":"tilgovi","id":20818,"avatar_url":"https://avatars.githubusercontent.com/u/20818?v=3","gravatar_id":"","url":"https://api.github.com/users/tilgovi","html_url":"https://github.com/tilgovi","followers_url":"https://api.github.com/users/tilgovi/followers","following_url":"https://api.github.com/users/tilgovi/following{/other_user}","gists_url":"https://api.github.com/users/tilgovi/gists{/gist_id}","starred_url":"https://api.github.com/users/tilgovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilgovi/subscriptions","organizations_url":"https://api.github.com/users/tilgovi/orgs","repos_url":"https://api.github.com/users/tilgovi/repos","events_url":"https://api.github.com/users/tilgovi/events{/privacy}","received_events_url":"https://api.github.com/users/tilgovi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2015-03-25T19:22:41Z","updated_at":"2015-03-26T15:22:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hypothesis/h/pulls/2092","html_url":"https://github.com/hypothesis/h/pull/2092","diff_url":"https://github.com/hypothesis/h/pull/2092.diff","patch_url":"https://github.com/hypothesis/h/pull/2092.patch"},"body":"Prevent negative interactions with module systems present in injected\r\npages and refactor browserify interactions with angular to increase\r\nCommonJS accessibility / legibility and isolate angular module system\r\nboilerplate.\r\n\r\n- Avoid issues due to mis-detected module environments\r\n\r\n  - In the injection script, load only Annotator and jQuery in the\r\n    global scope and then both removed with `noConflict()`. Both are\r\n    loaded with browserify-shim, which prevents jQuery from registering\r\n    itself against require.js, if present (fix #2026).\r\n\r\n  - Be explicit about registration of common cross-frame components.\r\n\r\n    - Lift angular glue into app.coffee. Individual components are\r\n      exported as CommonJS modules.\r\n\r\n    - Lift Annotator glue into bootstrap.js (renamed hypothesis.js).\r\n\r\n- Break the helpers bundle up and create services and directives.\r\n\r\n  - formHelpers -> {formInput, formValidate, formRespond}\r\n  - stringHelpers -> unicode\r\n  - tagHelpers -> tags\r\n  - timeHelpers -> time\r\n  - uiHelpers -> {tabbable, tabReveal}\r\n\r\n- Rename all services, dropping the -service suffix, to match their\r\n  injected names. This is consistent with how directives are being\r\n  treated, and controllers as well (controllers are registered and\r\n  injected done with the \"Controller\" suffix).\r\n\r\n- Move Annotator subclasses into the annotator subdirectory. This\r\n  change avoids having `Annotator.Host` clash with the `host`\r\n  service and makes it easy to glob dependencies in assets.yaml to\r\n  minimally rebuild either the app or the inject.\r\n\r\n- Split up directives.coffee, services.coffee, filters.coffee, and\r\n  controllers.coffee."},"comment":{"url":"https://api.github.com/repos/hypothesis/h/issues/comments/86566510","html_url":"https://github.com/hypothesis/h/pull/2092#issuecomment-86566510","issue_url":"https://api.github.com/repos/hypothesis/h/issues/2092","id":86566510,"user":{"login":"nickstenning","id":3602,"avatar_url":"https://avatars.githubusercontent.com/u/3602?v=3","gravatar_id":"","url":"https://api.github.com/users/nickstenning","html_url":"https://github.com/nickstenning","followers_url":"https://api.github.com/users/nickstenning/followers","following_url":"https://api.github.com/users/nickstenning/following{/other_user}","gists_url":"https://api.github.com/users/nickstenning/gists{/gist_id}","starred_url":"https://api.github.com/users/nickstenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickstenning/subscriptions","organizations_url":"https://api.github.com/users/nickstenning/orgs","repos_url":"https://api.github.com/users/nickstenning/repos","events_url":"https://api.github.com/users/nickstenning/events{/privacy}","received_events_url":"https://api.github.com/users/nickstenning/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T15:22:00Z","updated_at":"2015-03-26T15:22:00Z","body":"Rebased to take account of #2100, and two commits added to fix the issues identified by @gergely-ujvari."}}