{"action":"created","issue":{"url":"https://api.github.com/repos/phosphorjs/phosphor/issues/105","repository_url":"https://api.github.com/repos/phosphorjs/phosphor","labels_url":"https://api.github.com/repos/phosphorjs/phosphor/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/phosphorjs/phosphor/issues/105/comments","events_url":"https://api.github.com/repos/phosphorjs/phosphor/issues/105/events","html_url":"https://github.com/phosphorjs/phosphor/pull/105","id":163527547,"number":105,"title":"Proof of concept webpack build","user":{"login":"blink1073","id":2096628,"avatar_url":"https://avatars.githubusercontent.com/u/2096628?v=3","gravatar_id":"","url":"https://api.github.com/users/blink1073","html_url":"https://github.com/blink1073","followers_url":"https://api.github.com/users/blink1073/followers","following_url":"https://api.github.com/users/blink1073/following{/other_user}","gists_url":"https://api.github.com/users/blink1073/gists{/gist_id}","starred_url":"https://api.github.com/users/blink1073/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blink1073/subscriptions","organizations_url":"https://api.github.com/users/blink1073/orgs","repos_url":"https://api.github.com/users/blink1073/repos","events_url":"https://api.github.com/users/blink1073/events{/privacy}","received_events_url":"https://api.github.com/users/blink1073/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2016-07-02T17:09:02Z","updated_at":"2016-08-15T15:56:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/phosphorjs/phosphor/pulls/105","html_url":"https://github.com/phosphorjs/phosphor/pull/105","diff_url":"https://github.com/phosphorjs/phosphor/pull/105.diff","patch_url":"https://github.com/phosphorjs/phosphor/pull/105.patch"},"body":"This allows `phosphor` to be used as a set of UMD `WebPack` bundles while still using the individual module import paths (or the index files in each sub-directory).\r\n\r\ncf https://github.com/jupyter/jupyterlab/issues/224\r\n\r\ncc @SylvainCorlay @jasongrout \r\n\r\nConsumers of the bundles would use the following `externals` Webpack config (using the `this` loader in this case, which yields `this[\"phosphor/lib/algorithm\"]` for example):\r\n\r\n```javascript\r\nfunction(context, request, callback) {\r\n        var regex = /phosphor\\/lib\\/([a-z]+)\\/.*$/\r\n        if(regex.test(request)) {\r\n            var matches = regex.exec(request)\r\n            var lib = 'this phosphor/lib/' + matches[1];  // or 'amd' if using requirejs\r\n            return callback(null, lib);\r\n        }\r\n        callback();\r\n      }\r\n```\r\n\r\nThis same model would be applied to `JupyterLab` (and the classic notebook).\r\n\r\nHere is what the header of `dist/algorithm.js` looks like:\r\n\r\n```javascript\r\n(function webpackUniversalModuleDefinition(root, factory) {\r\n\tif(typeof exports === 'object' && typeof module === 'object')\r\n\t\tmodule.exports = factory();\r\n\telse if(typeof define === 'function' && define.amd)\r\n\t\tdefine(\"phosphor/lib/algorithm\", [], factory);\r\n\telse if(typeof exports === 'object')\r\n\t\texports[\"phosphor/lib/algorithm\"] = factory();\r\n\telse\r\n\t\troot[\"phosphor/lib/algorithm\"] = factory();\r\n})(this, function() {\r\n```"},"comment":{"url":"https://api.github.com/repos/phosphorjs/phosphor/issues/comments/239842917","html_url":"https://github.com/phosphorjs/phosphor/pull/105#issuecomment-239842917","issue_url":"https://api.github.com/repos/phosphorjs/phosphor/issues/105","id":239842917,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-08-15T15:56:09Z","updated_at":"2016-08-15T15:56:09Z","body":"\n[![Coverage Status](https://coveralls.io/builds/7452835/badge)](https://coveralls.io/builds/7452835)\n\nCoverage remained the same at 96.164% when pulling **0b64bfa6377c17c725722af149110842adccef85 on blink1073:webpack** into **c000b024a3d7ab7b5b98bd4d4867e19e55068f3c on phosphorjs:master**.\n"}}
{"actor":{"display_login":"coveralls"}}