{"action":"created","issue":{"url":"https://api.github.com/repos/codice/usng2/issues/11","repository_url":"https://api.github.com/repos/codice/usng2","labels_url":"https://api.github.com/repos/codice/usng2/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/codice/usng2/issues/11/comments","events_url":"https://api.github.com/repos/codice/usng2/issues/11/events","html_url":"https://github.com/codice/usng2/pull/11","id":350229064,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MTMxNDMy","number":11,"title":"Hacks in browserify + google-closure-compiler bundling step.","user":{"login":"coyotesqrl","id":1469860,"node_id":"MDQ6VXNlcjE0Njk4NjA=","avatar_url":"https://avatars2.githubusercontent.com/u/1469860?v=4","gravatar_id":"","url":"https://api.github.com/users/coyotesqrl","html_url":"https://github.com/coyotesqrl","followers_url":"https://api.github.com/users/coyotesqrl/followers","following_url":"https://api.github.com/users/coyotesqrl/following{/other_user}","gists_url":"https://api.github.com/users/coyotesqrl/gists{/gist_id}","starred_url":"https://api.github.com/users/coyotesqrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coyotesqrl/subscriptions","organizations_url":"https://api.github.com/users/coyotesqrl/orgs","repos_url":"https://api.github.com/users/coyotesqrl/repos","events_url":"https://api.github.com/users/coyotesqrl/events{/privacy}","received_events_url":"https://api.github.com/users/coyotesqrl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-08-13T23:28:27Z","updated_at":"2018-08-23T22:00:53Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/codice/usng2/pulls/11","html_url":"https://github.com/codice/usng2/pull/11","diff_url":"https://github.com/codice/usng2/pull/11.diff","patch_url":"https://github.com/codice/usng2/pull/11.patch"},"body":"### Requirements\r\n* Filling out the template is required. Any pull request that does not\r\ninclude enough information to be reviewed in a timely manner may be\r\nclosed at the maintainers' discretion.\r\n* All new code requires tests to ensure against regressions\r\n\r\n### Description of the Change\r\n<!--\r\nWe must be able to understand the design of your change from this\r\ndescription. If we can't get a good idea of what the code will be doing\r\nfrom the description here, the pull request may be closed at the\r\nmaintainers' discretion. Keep in mind that the maintainer reviewing this\r\nPR may not be familiar with or have worked with the code here recently,\r\nso please walk us through the concepts.\r\n-->\r\nThis change uses browserify + google-closure-compiler to bundle and eliminate dead code from the final output file. The resulting javascript is UMD and has no external dependencies.\r\n\r\nThe ideal solution would add a new `bundler` implementation to the `KotlinFrontendExtension` and remove the `webpack` bundle plugin; however, there is an issue with the `npm-index` task in KFE right now that needs to be resolved before that can even be attempted. While this is kludgy, the output is correct.\r\n\r\n### Alternate Designs\r\n<!--\r\nExplain what other alternates were considered and why the proposed\r\nversion was selected\r\n-->\r\nAs mentioned above, a new bundler would be ideal.\r\n\r\n### Benefits\r\n<!--\r\nWhat benefits will be realized by the code change?\r\n-->\r\nThis produces an npm artifact that works in both the browser and node.\r\n\r\n### Possible Drawbacks\r\n<!--\r\nWhat are the possible side-effects or negative impacts of the code change?\r\n-->\r\nThe final output file size is still rather large at ~660K.\r\n\r\nIn an environment with many Kotlin-derived JavaScript libraries, it would be preferable to exclude the Kotlin runtime in the output bundle and amortize the cost of that across multiple consumers.\r\n\r\n### Verification Process\r\n<!--\r\nWhat process did you follow to verify that your change has the desired effects?\r\n- How did you verify that all new functionality works as expected?\r\n- How did you verify that all changed functionality works as expected?\r\n- How did you verify that the change has not introduced any regressions?\r\n-->\r\n\r\n### Checklist:\r\n- [ ] Common Kotlin Unit Tests Added/Modified\r\n- [ ] Javascript Mocha Tests Added to `js-test` module\r\n\r\n### Applicable Issues\r\n<!--\r\nEnter any applicable Issues here\r\n-->\r\nFixes: #13 "},"comment":{"url":"https://api.github.com/repos/codice/usng2/issues/comments/415585115","html_url":"https://github.com/codice/usng2/pull/11#issuecomment-415585115","issue_url":"https://api.github.com/repos/codice/usng2/issues/11","id":415585115,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTU4NTExNQ==","user":{"login":"coyotesqrl","id":1469860,"node_id":"MDQ6VXNlcjE0Njk4NjA=","avatar_url":"https://avatars2.githubusercontent.com/u/1469860?v=4","gravatar_id":"","url":"https://api.github.com/users/coyotesqrl","html_url":"https://github.com/coyotesqrl","followers_url":"https://api.github.com/users/coyotesqrl/followers","following_url":"https://api.github.com/users/coyotesqrl/following{/other_user}","gists_url":"https://api.github.com/users/coyotesqrl/gists{/gist_id}","starred_url":"https://api.github.com/users/coyotesqrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coyotesqrl/subscriptions","organizations_url":"https://api.github.com/users/coyotesqrl/orgs","repos_url":"https://api.github.com/users/coyotesqrl/repos","events_url":"https://api.github.com/users/coyotesqrl/events{/privacy}","received_events_url":"https://api.github.com/users/coyotesqrl/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T22:00:53Z","updated_at":"2018-08-23T22:00:53Z","author_association":"MEMBER","body":"build now"}}
{"actor":{"display_login":"coyotesqrl"}}