{"action":"created","comment":{"url":"https://api.github.com/repos/emberjs/rfcs/pulls/comments/33227698","id":33227698,"diff_hunk":"@@ -0,0 +1,122 @@\n+- Start Date: (2015-06-16)\n+- RFC PR: (leave this empty)\n+- Ember Issue: (leave this empty)\n+\n+# Summary\n+\n+Instead of accessing functions and classes directly on the `Ember` namespace,\n+move all the public API under ES6 modules.\n+\n+# Motivation\n+\n+As build tooling improved during the recent years, especially with Ember CLI, it\n+is now fairly straightforward to rely only on ES6 modules. This comes with a\n+number of benefits:\n+\n+1. Future-proofing. Since modules are part of the ECMAScript specification, it\n+   is clear that they become commonplace fairly soon. Ember has long been\n+   pushing the approach, this RFC just continues what's been started a couple\n+   years ago with Ember AppKit, followed by Ember CLI.\n+2. Makes possible to distribute ember in smaller packages. This could further\n+   slim down Ember's infamous byte size - but note that this may not mean\n+   completely separate NPM modules. Some libraries are even worthy of\n+   distributed by themselves, for example the module-based resolver is already a\n+   separate package. Some notable others are also simply external libraries\n+   packaged alongside Ember.\n+3. Treeshaking. Since dependencies could be determined at compile-time based on\n+   the `import` statements, parts of Ember that are not used by an application\n+   would not end up in the final build. Think of including only\n+   `HistoryLocation` when an app doesn't need to support hashchange-only\n+   browsers.\n+\n+# Detailed design\n+\n+## End-user syntax\n+\n+Take the following Ember CLI example:\n+\n+```js\n+import Ember from 'ember';\n+\n+export Ember.Component.extend({\n+  someMethod(arg) {\n+    return Ember.isBlank(arg);\n+  }\n+});\n+```\n+\n+Here, both `Ember.Component` and `Ember.isBlank` could be `import`ed:\n+\n+```js\n+import Component from 'ember-component';\n+import { isBlank } from 'ember-utils';","path":"text/0000-es6-modules.md","position":52,"original_position":52,"commit_id":"82873603da80677b9d901597661ec20ed18697be","original_commit_id":"82873603da80677b9d901597661ec20ed18697be","user":{"login":"zeppelin","id":97832,"avatar_url":"https://avatars.githubusercontent.com/u/97832?v=3","gravatar_id":"","url":"https://api.github.com/users/zeppelin","html_url":"https://github.com/zeppelin","followers_url":"https://api.github.com/users/zeppelin/followers","following_url":"https://api.github.com/users/zeppelin/following{/other_user}","gists_url":"https://api.github.com/users/zeppelin/gists{/gist_id}","starred_url":"https://api.github.com/users/zeppelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeppelin/subscriptions","organizations_url":"https://api.github.com/users/zeppelin/orgs","repos_url":"https://api.github.com/users/zeppelin/repos","events_url":"https://api.github.com/users/zeppelin/events{/privacy}","received_events_url":"https://api.github.com/users/zeppelin/received_events","type":"User","site_admin":false},"body":"Is there no way to do tree-shaking for named exports or just harder than for defaults?","created_at":"2015-06-25T07:12:31Z","updated_at":"2015-06-25T07:12:31Z","html_url":"https://github.com/emberjs/rfcs/pull/68#discussion_r33227698","pull_request_url":"https://api.github.com/repos/emberjs/rfcs/pulls/68","_links":{"self":{"href":"https://api.github.com/repos/emberjs/rfcs/pulls/comments/33227698"},"html":{"href":"https://github.com/emberjs/rfcs/pull/68#discussion_r33227698"},"pull_request":{"href":"https://api.github.com/repos/emberjs/rfcs/pulls/68"}}},"pull_request":{"url":"https://api.github.com/repos/emberjs/rfcs/pulls/68","id":38367556,"html_url":"https://github.com/emberjs/rfcs/pull/68","diff_url":"https://github.com/emberjs/rfcs/pull/68.diff","patch_url":"https://github.com/emberjs/rfcs/pull/68.patch","issue_url":"https://api.github.com/repos/emberjs/rfcs/issues/68","number":68,"state":"open","locked":false,"title":"ES6 modules","user":{"login":"zeppelin","id":97832,"avatar_url":"https://avatars.githubusercontent.com/u/97832?v=3","gravatar_id":"","url":"https://api.github.com/users/zeppelin","html_url":"https://github.com/zeppelin","followers_url":"https://api.github.com/users/zeppelin/followers","following_url":"https://api.github.com/users/zeppelin/following{/other_user}","gists_url":"https://api.github.com/users/zeppelin/gists{/gist_id}","starred_url":"https://api.github.com/users/zeppelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeppelin/subscriptions","organizations_url":"https://api.github.com/users/zeppelin/orgs","repos_url":"https://api.github.com/users/zeppelin/repos","events_url":"https://api.github.com/users/zeppelin/events{/privacy}","received_events_url":"https://api.github.com/users/zeppelin/received_events","type":"User","site_admin":false},"body":"[Rendered](https://github.com/zeppelin/rfcs/blob/es6-modules/text/0000-es6-modules.md)","created_at":"2015-06-23T18:28:23Z","updated_at":"2015-06-25T07:12:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4267a78ca007917c6a9551649937eeef01f00f67","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/emberjs/rfcs/pulls/68/commits","review_comments_url":"https://api.github.com/repos/emberjs/rfcs/pulls/68/comments","review_comment_url":"https://api.github.com/repos/emberjs/rfcs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emberjs/rfcs/issues/68/comments","statuses_url":"https://api.github.com/repos/emberjs/rfcs/statuses/82873603da80677b9d901597661ec20ed18697be","head":{"label":"zeppelin:es6-modules","ref":"es6-modules","sha":"82873603da80677b9d901597661ec20ed18697be","user":{"login":"zeppelin","id":97832,"avatar_url":"https://avatars.githubusercontent.com/u/97832?v=3","gravatar_id":"","url":"https://api.github.com/users/zeppelin","html_url":"https://github.com/zeppelin","followers_url":"https://api.github.com/users/zeppelin/followers","following_url":"https://api.github.com/users/zeppelin/following{/other_user}","gists_url":"https://api.github.com/users/zeppelin/gists{/gist_id}","starred_url":"https://api.github.com/users/zeppelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeppelin/subscriptions","organizations_url":"https://api.github.com/users/zeppelin/orgs","repos_url":"https://api.github.com/users/zeppelin/repos","events_url":"https://api.github.com/users/zeppelin/events{/privacy}","received_events_url":"https://api.github.com/users/zeppelin/received_events","type":"User","site_admin":false},"repo":{"id":28970639,"name":"rfcs","full_name":"zeppelin/rfcs","owner":{"login":"zeppelin","id":97832,"avatar_url":"https://avatars.githubusercontent.com/u/97832?v=3","gravatar_id":"","url":"https://api.github.com/users/zeppelin","html_url":"https://github.com/zeppelin","followers_url":"https://api.github.com/users/zeppelin/followers","following_url":"https://api.github.com/users/zeppelin/following{/other_user}","gists_url":"https://api.github.com/users/zeppelin/gists{/gist_id}","starred_url":"https://api.github.com/users/zeppelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeppelin/subscriptions","organizations_url":"https://api.github.com/users/zeppelin/orgs","repos_url":"https://api.github.com/users/zeppelin/repos","events_url":"https://api.github.com/users/zeppelin/events{/privacy}","received_events_url":"https://api.github.com/users/zeppelin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zeppelin/rfcs","description":"RFCs for changes to Ember","fork":true,"url":"https://api.github.com/repos/zeppelin/rfcs","forks_url":"https://api.github.com/repos/zeppelin/rfcs/forks","keys_url":"https://api.github.com/repos/zeppelin/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zeppelin/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zeppelin/rfcs/teams","hooks_url":"https://api.github.com/repos/zeppelin/rfcs/hooks","issue_events_url":"https://api.github.com/repos/zeppelin/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/zeppelin/rfcs/events","assignees_url":"https://api.github.com/repos/zeppelin/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/zeppelin/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/zeppelin/rfcs/tags","blobs_url":"https://api.github.com/repos/zeppelin/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zeppelin/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zeppelin/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/zeppelin/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zeppelin/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/zeppelin/rfcs/languages","stargazers_url":"https://api.github.com/repos/zeppelin/rfcs/stargazers","contributors_url":"https://api.github.com/repos/zeppelin/rfcs/contributors","subscribers_url":"https://api.github.com/repos/zeppelin/rfcs/subscribers","subscription_url":"https://api.github.com/repos/zeppelin/rfcs/subscription","commits_url":"https://api.github.com/repos/zeppelin/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/zeppelin/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/zeppelin/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/zeppelin/rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/zeppelin/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/zeppelin/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zeppelin/rfcs/merges","archive_url":"https://api.github.com/repos/zeppelin/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zeppelin/rfcs/downloads","issues_url":"https://api.github.com/repos/zeppelin/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/zeppelin/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/zeppelin/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/zeppelin/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zeppelin/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/zeppelin/rfcs/releases{/id}","created_at":"2015-01-08T14:54:48Z","updated_at":"2015-01-06T17:45:58Z","pushed_at":"2015-06-22T20:15:14Z","git_url":"git://github.com/zeppelin/rfcs.git","ssh_url":"git@github.com:zeppelin/rfcs.git","clone_url":"https://github.com/zeppelin/rfcs.git","svn_url":"https://github.com/zeppelin/rfcs","homepage":null,"size":206,"stargazers_count":0,"watchers_count":0,"language":null,"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":"emberjs:master","ref":"master","sha":"17e745ed98904a604fb9a034f1b35883db5e28f0","user":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"repo":{"id":22664562,"name":"rfcs","full_name":"emberjs/rfcs","owner":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emberjs/rfcs","description":"RFCs for changes to Ember","fork":false,"url":"https://api.github.com/repos/emberjs/rfcs","forks_url":"https://api.github.com/repos/emberjs/rfcs/forks","keys_url":"https://api.github.com/repos/emberjs/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emberjs/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emberjs/rfcs/teams","hooks_url":"https://api.github.com/repos/emberjs/rfcs/hooks","issue_events_url":"https://api.github.com/repos/emberjs/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/emberjs/rfcs/events","assignees_url":"https://api.github.com/repos/emberjs/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/emberjs/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/emberjs/rfcs/tags","blobs_url":"https://api.github.com/repos/emberjs/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emberjs/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emberjs/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/emberjs/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emberjs/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/emberjs/rfcs/languages","stargazers_url":"https://api.github.com/repos/emberjs/rfcs/stargazers","contributors_url":"https://api.github.com/repos/emberjs/rfcs/contributors","subscribers_url":"https://api.github.com/repos/emberjs/rfcs/subscribers","subscription_url":"https://api.github.com/repos/emberjs/rfcs/subscription","commits_url":"https://api.github.com/repos/emberjs/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/emberjs/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/emberjs/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/emberjs/rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/emberjs/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/emberjs/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emberjs/rfcs/merges","archive_url":"https://api.github.com/repos/emberjs/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emberjs/rfcs/downloads","issues_url":"https://api.github.com/repos/emberjs/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/emberjs/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/emberjs/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/emberjs/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emberjs/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/emberjs/rfcs/releases{/id}","created_at":"2014-08-06T00:49:22Z","updated_at":"2015-06-22T17:51:48Z","pushed_at":"2015-06-24T15:18:07Z","git_url":"git://github.com/emberjs/rfcs.git","ssh_url":"git@github.com:emberjs/rfcs.git","clone_url":"https://github.com/emberjs/rfcs.git","svn_url":"https://github.com/emberjs/rfcs","homepage":null,"size":1502,"stargazers_count":301,"watchers_count":301,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":25,"forks":66,"open_issues":25,"watchers":301,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emberjs/rfcs/pulls/68"},"html":{"href":"https://github.com/emberjs/rfcs/pull/68"},"issue":{"href":"https://api.github.com/repos/emberjs/rfcs/issues/68"},"comments":{"href":"https://api.github.com/repos/emberjs/rfcs/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/emberjs/rfcs/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/emberjs/rfcs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emberjs/rfcs/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/emberjs/rfcs/statuses/82873603da80677b9d901597661ec20ed18697be"}}}}