{"action":"created","comment":{"url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/comments/57511547","id":57511547,"diff_hunk":"@@ -0,0 +1,39 @@\n+/**\n+ * @file index 为所有const对象添加Object.freeze\n+ * @author zongyu(liuxuanzy@qq.com)\n+ */\n+\n+import template from 'babel-template';\n+\n+let buildFactory = template(`Object.freeze($0)`);\n+\n+module.exports = function ({types: t}) {","path":"src/index.es","position":10,"original_position":10,"commit_id":"3c9040fab363e30c40eb0c162ce1c96416599bc9","original_commit_id":"3c9040fab363e30c40eb0c162ce1c96416599bc9","user":{"login":"otakustay","id":639549,"avatar_url":"https://avatars.githubusercontent.com/u/639549?v=3","gravatar_id":"","url":"https://api.github.com/users/otakustay","html_url":"https://github.com/otakustay","followers_url":"https://api.github.com/users/otakustay/followers","following_url":"https://api.github.com/users/otakustay/following{/other_user}","gists_url":"https://api.github.com/users/otakustay/gists{/gist_id}","starred_url":"https://api.github.com/users/otakustay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otakustay/subscriptions","organizations_url":"https://api.github.com/users/otakustay/orgs","repos_url":"https://api.github.com/users/otakustay/repos","events_url":"https://api.github.com/users/otakustay/events{/privacy}","received_events_url":"https://api.github.com/users/otakustay/received_events","type":"User","site_admin":false},"body":"这个最好和其它社区里的babel插件保持一致，方便别人使用\n\n> 在 2016年3月26日，下午5:39，Yang Huabei <notifications@github.com> 写道：\n> \n> In src/index.es:\n> \n> > @@ -0,0 +1,39 @@\n> > +/**\n> > + * @file index 为所有const对象添加Object.freeze\n> > + * @author zongyu(liuxuanzy@qq.com)\n> > + */\n> > +\n> > +import template from 'babel-template';\n> > +\n> > +let buildFactory = template(`Object.freeze($0)`);\n> > +\n> > +module.exports = function ({types: t}) {\n> 可以考虑使用es6定义模块，反正要用babel转码\n> \n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly or view it on GitHub\n> \n","created_at":"2016-03-26T09:42:04Z","updated_at":"2016-03-26T09:42:04Z","html_url":"https://github.com/ecomfe/babel-plugin-freeze-const/pull/1#discussion_r57511547","pull_request_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/comments/57511547"},"html":{"href":"https://github.com/ecomfe/babel-plugin-freeze-const/pull/1#discussion_r57511547"},"pull_request":{"href":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/1","id":63680171,"html_url":"https://github.com/ecomfe/babel-plugin-freeze-const/pull/1","diff_url":"https://github.com/ecomfe/babel-plugin-freeze-const/pull/1.diff","patch_url":"https://github.com/ecomfe/babel-plugin-freeze-const/pull/1.patch","issue_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/issues/1","number":1,"state":"open","locked":false,"title":"看到了就写了一下","user":{"login":"liuxuanzy","id":6613276,"avatar_url":"https://avatars.githubusercontent.com/u/6613276?v=3","gravatar_id":"","url":"https://api.github.com/users/liuxuanzy","html_url":"https://github.com/liuxuanzy","followers_url":"https://api.github.com/users/liuxuanzy/followers","following_url":"https://api.github.com/users/liuxuanzy/following{/other_user}","gists_url":"https://api.github.com/users/liuxuanzy/gists{/gist_id}","starred_url":"https://api.github.com/users/liuxuanzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuxuanzy/subscriptions","organizations_url":"https://api.github.com/users/liuxuanzy/orgs","repos_url":"https://api.github.com/users/liuxuanzy/repos","events_url":"https://api.github.com/users/liuxuanzy/events{/privacy}","received_events_url":"https://api.github.com/users/liuxuanzy/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-22T07:38:37Z","updated_at":"2016-03-26T09:42:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92ebf8bc01822cd6c4c924c73d16565ef34c6257","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/issues/1/comments","statuses_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/statuses/3c9040fab363e30c40eb0c162ce1c96416599bc9","head":{"label":"liuxuanzy:master","ref":"master","sha":"3c9040fab363e30c40eb0c162ce1c96416599bc9","user":{"login":"liuxuanzy","id":6613276,"avatar_url":"https://avatars.githubusercontent.com/u/6613276?v=3","gravatar_id":"","url":"https://api.github.com/users/liuxuanzy","html_url":"https://github.com/liuxuanzy","followers_url":"https://api.github.com/users/liuxuanzy/followers","following_url":"https://api.github.com/users/liuxuanzy/following{/other_user}","gists_url":"https://api.github.com/users/liuxuanzy/gists{/gist_id}","starred_url":"https://api.github.com/users/liuxuanzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuxuanzy/subscriptions","organizations_url":"https://api.github.com/users/liuxuanzy/orgs","repos_url":"https://api.github.com/users/liuxuanzy/repos","events_url":"https://api.github.com/users/liuxuanzy/events{/privacy}","received_events_url":"https://api.github.com/users/liuxuanzy/received_events","type":"User","site_admin":false},"repo":{"id":54450446,"name":"babel-plugin-freeze-const","full_name":"liuxuanzy/babel-plugin-freeze-const","owner":{"login":"liuxuanzy","id":6613276,"avatar_url":"https://avatars.githubusercontent.com/u/6613276?v=3","gravatar_id":"","url":"https://api.github.com/users/liuxuanzy","html_url":"https://github.com/liuxuanzy","followers_url":"https://api.github.com/users/liuxuanzy/followers","following_url":"https://api.github.com/users/liuxuanzy/following{/other_user}","gists_url":"https://api.github.com/users/liuxuanzy/gists{/gist_id}","starred_url":"https://api.github.com/users/liuxuanzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuxuanzy/subscriptions","organizations_url":"https://api.github.com/users/liuxuanzy/orgs","repos_url":"https://api.github.com/users/liuxuanzy/repos","events_url":"https://api.github.com/users/liuxuanzy/events{/privacy}","received_events_url":"https://api.github.com/users/liuxuanzy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liuxuanzy/babel-plugin-freeze-const","description":"A babel plugin to add Object.freeze to all const declaration","fork":true,"url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const","forks_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/forks","keys_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/teams","hooks_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/hooks","issue_events_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/issues/events{/number}","events_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/events","assignees_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/assignees{/user}","branches_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/branches{/branch}","tags_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/tags","blobs_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/git/refs{/sha}","trees_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/statuses/{sha}","languages_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/languages","stargazers_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/stargazers","contributors_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/contributors","subscribers_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/subscribers","subscription_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/subscription","commits_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/commits{/sha}","git_commits_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/git/commits{/sha}","comments_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/comments{/number}","issue_comment_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/issues/comments{/number}","contents_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/contents/{+path}","compare_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/merges","archive_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/downloads","issues_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/issues{/number}","pulls_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/pulls{/number}","milestones_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/milestones{/number}","notifications_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/labels{/name}","releases_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/releases{/id}","deployments_url":"https://api.github.com/repos/liuxuanzy/babel-plugin-freeze-const/deployments","created_at":"2016-03-22T06:20:01Z","updated_at":"2016-03-22T07:28:00Z","pushed_at":"2016-03-22T07:31:36Z","git_url":"git://github.com/liuxuanzy/babel-plugin-freeze-const.git","ssh_url":"git@github.com:liuxuanzy/babel-plugin-freeze-const.git","clone_url":"https://github.com/liuxuanzy/babel-plugin-freeze-const.git","svn_url":"https://github.com/liuxuanzy/babel-plugin-freeze-const","homepage":null,"size":3,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"ecomfe:master","ref":"master","sha":"a12ba67ce349ff3e04589a254868b8a893dff89d","user":{"login":"ecomfe","id":2268460,"avatar_url":"https://avatars.githubusercontent.com/u/2268460?v=3","gravatar_id":"","url":"https://api.github.com/users/ecomfe","html_url":"https://github.com/ecomfe","followers_url":"https://api.github.com/users/ecomfe/followers","following_url":"https://api.github.com/users/ecomfe/following{/other_user}","gists_url":"https://api.github.com/users/ecomfe/gists{/gist_id}","starred_url":"https://api.github.com/users/ecomfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecomfe/subscriptions","organizations_url":"https://api.github.com/users/ecomfe/orgs","repos_url":"https://api.github.com/users/ecomfe/repos","events_url":"https://api.github.com/users/ecomfe/events{/privacy}","received_events_url":"https://api.github.com/users/ecomfe/received_events","type":"Organization","site_admin":false},"repo":{"id":54175958,"name":"babel-plugin-freeze-const","full_name":"ecomfe/babel-plugin-freeze-const","owner":{"login":"ecomfe","id":2268460,"avatar_url":"https://avatars.githubusercontent.com/u/2268460?v=3","gravatar_id":"","url":"https://api.github.com/users/ecomfe","html_url":"https://github.com/ecomfe","followers_url":"https://api.github.com/users/ecomfe/followers","following_url":"https://api.github.com/users/ecomfe/following{/other_user}","gists_url":"https://api.github.com/users/ecomfe/gists{/gist_id}","starred_url":"https://api.github.com/users/ecomfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecomfe/subscriptions","organizations_url":"https://api.github.com/users/ecomfe/orgs","repos_url":"https://api.github.com/users/ecomfe/repos","events_url":"https://api.github.com/users/ecomfe/events{/privacy}","received_events_url":"https://api.github.com/users/ecomfe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ecomfe/babel-plugin-freeze-const","description":"A babel plugin to add Object.freeze to all const declaration","fork":false,"url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const","forks_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/forks","keys_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/teams","hooks_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/hooks","issue_events_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/issues/events{/number}","events_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/events","assignees_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/assignees{/user}","branches_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/branches{/branch}","tags_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/tags","blobs_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/git/refs{/sha}","trees_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/statuses/{sha}","languages_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/languages","stargazers_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/stargazers","contributors_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/contributors","subscribers_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/subscribers","subscription_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/subscription","commits_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/commits{/sha}","git_commits_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/git/commits{/sha}","comments_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/comments{/number}","issue_comment_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/issues/comments{/number}","contents_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/contents/{+path}","compare_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/merges","archive_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/downloads","issues_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/issues{/number}","pulls_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls{/number}","milestones_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/milestones{/number}","notifications_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/labels{/name}","releases_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/releases{/id}","deployments_url":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/deployments","created_at":"2016-03-18T05:22:08Z","updated_at":"2016-03-18T05:22:08Z","pushed_at":"2016-03-22T07:38:37Z","git_url":"git://github.com/ecomfe/babel-plugin-freeze-const.git","ssh_url":"git@github.com:ecomfe/babel-plugin-freeze-const.git","clone_url":"https://github.com/ecomfe/babel-plugin-freeze-const.git","svn_url":"https://github.com/ecomfe/babel-plugin-freeze-const","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/1"},"html":{"href":"https://github.com/ecomfe/babel-plugin-freeze-const/pull/1"},"issue":{"href":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/issues/1"},"comments":{"href":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ecomfe/babel-plugin-freeze-const/statuses/3c9040fab363e30c40eb0c162ce1c96416599bc9"}}}}