{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/react/pulls/comments/59793212","id":59793212,"diff_hunk":"@@ -18,63 +39,35 @@ Example:\n ```java\n import java.io.IOException;\n import java.io.InputStream;\n-import java.net.MalformedURLException;\n-import java.net.URL;\n+import java.io.FileReader;\n \n import javax.script.ScriptEngine;\n import javax.script.ScriptEngineManager;\n import javax.script.ScriptException;\n \n-import org.apache.commons.io.IOUtils;  // https://commons.apache.org/proper/commons-io/download_io.cgi\n-\n public class ReactRender\n {\n   public static void main(String[] args) throws ScriptException, IOException {\n     ScriptEngine nashorn = new ScriptEngineManager().getEngineByName(\"nashorn\");\n \n-    nashorn.eval(getScript(\"https://fb.me/react-15.0.1.js\"));\n-    nashorn.eval(getScript(\"https://fb.me/react-dom-server-15.0.1.js\"));\n-\n-    System.out.println(nashorn.eval(\"ReactDOMServer.renderToString(React.createElement('div', {}, 'Hello World!'));\"));\n-  }\n+    nashorn.eval(new FileReader(\"path/to/react.js\"));\n+    nashorn.eval(new FileReader(\"path/to/react-dom-server.js\"));","path":"docs/docs/09.3-environments.md","position":53,"original_position":53,"commit_id":"d513f3287611ff91178f2667866078f7d56b7df1","original_commit_id":"d513f3287611ff91178f2667866078f7d56b7df1","user":{"login":"zpao","id":8445,"avatar_url":"https://avatars.githubusercontent.com/u/8445?v=3","gravatar_id":"","url":"https://api.github.com/users/zpao","html_url":"https://github.com/zpao","followers_url":"https://api.github.com/users/zpao/followers","following_url":"https://api.github.com/users/zpao/following{/other_user}","gists_url":"https://api.github.com/users/zpao/gists{/gist_id}","starred_url":"https://api.github.com/users/zpao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zpao/subscriptions","organizations_url":"https://api.github.com/users/zpao/orgs","repos_url":"https://api.github.com/users/zpao/repos","events_url":"https://api.github.com/users/zpao/events{/privacy}","received_events_url":"https://api.github.com/users/zpao/received_events","type":"User","site_admin":false},"body":"`// These files can be downloaded as a part of the starter kit from https://facebook.github.io/react`","created_at":"2016-04-14T21:15:06Z","updated_at":"2016-04-14T21:15:06Z","html_url":"https://github.com/facebook/react/pull/6519#discussion_r59793212","pull_request_url":"https://api.github.com/repos/facebook/react/pulls/6519","_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/comments/59793212"},"html":{"href":"https://github.com/facebook/react/pull/6519#discussion_r59793212"},"pull_request":{"href":"https://api.github.com/repos/facebook/react/pulls/6519"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/react/pulls/6519","id":66553485,"html_url":"https://github.com/facebook/react/pull/6519","diff_url":"https://github.com/facebook/react/pull/6519.diff","patch_url":"https://github.com/facebook/react/pull/6519.patch","issue_url":"https://api.github.com/repos/facebook/react/issues/6519","number":6519,"state":"open","locked":false,"title":"Cleanup environments doc","user":{"login":"zpao","id":8445,"avatar_url":"https://avatars.githubusercontent.com/u/8445?v=3","gravatar_id":"","url":"https://api.github.com/users/zpao","html_url":"https://github.com/zpao","followers_url":"https://api.github.com/users/zpao/followers","following_url":"https://api.github.com/users/zpao/following{/other_user}","gists_url":"https://api.github.com/users/zpao/gists{/gist_id}","starred_url":"https://api.github.com/users/zpao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zpao/subscriptions","organizations_url":"https://api.github.com/users/zpao/orgs","repos_url":"https://api.github.com/users/zpao/repos","events_url":"https://api.github.com/users/zpao/events{/privacy}","received_events_url":"https://api.github.com/users/zpao/received_events","type":"User","site_admin":false},"body":"- Use correct \"Note\" formatting so they render correctly\n- reordered sections so Node is first\n- Use \"Node.js\" consistently (it is a product name just like Nashorn)\n- added/tweaked some of the text\n- simplified the Java code so it doesn't hit the internet.","created_at":"2016-04-14T21:03:42Z","updated_at":"2016-04-14T21:15:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24c3e83915b558519f2e82a72bd0287bed5bb4e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react/pulls/6519/commits","review_comments_url":"https://api.github.com/repos/facebook/react/pulls/6519/comments","review_comment_url":"https://api.github.com/repos/facebook/react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react/issues/6519/comments","statuses_url":"https://api.github.com/repos/facebook/react/statuses/d513f3287611ff91178f2667866078f7d56b7df1","head":{"label":"zpao:envdocsfixup","ref":"envdocsfixup","sha":"d513f3287611ff91178f2667866078f7d56b7df1","user":{"login":"zpao","id":8445,"avatar_url":"https://avatars.githubusercontent.com/u/8445?v=3","gravatar_id":"","url":"https://api.github.com/users/zpao","html_url":"https://github.com/zpao","followers_url":"https://api.github.com/users/zpao/followers","following_url":"https://api.github.com/users/zpao/following{/other_user}","gists_url":"https://api.github.com/users/zpao/gists{/gist_id}","starred_url":"https://api.github.com/users/zpao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zpao/subscriptions","organizations_url":"https://api.github.com/users/zpao/orgs","repos_url":"https://api.github.com/users/zpao/repos","events_url":"https://api.github.com/users/zpao/events{/privacy}","received_events_url":"https://api.github.com/users/zpao/received_events","type":"User","site_admin":false},"repo":{"id":10374986,"name":"react","full_name":"zpao/react","owner":{"login":"zpao","id":8445,"avatar_url":"https://avatars.githubusercontent.com/u/8445?v=3","gravatar_id":"","url":"https://api.github.com/users/zpao","html_url":"https://github.com/zpao","followers_url":"https://api.github.com/users/zpao/followers","following_url":"https://api.github.com/users/zpao/following{/other_user}","gists_url":"https://api.github.com/users/zpao/gists{/gist_id}","starred_url":"https://api.github.com/users/zpao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zpao/subscriptions","organizations_url":"https://api.github.com/users/zpao/orgs","repos_url":"https://api.github.com/users/zpao/repos","events_url":"https://api.github.com/users/zpao/events{/privacy}","received_events_url":"https://api.github.com/users/zpao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zpao/react","description":"React is a JavaScript library for building user interfaces.","fork":true,"url":"https://api.github.com/repos/zpao/react","forks_url":"https://api.github.com/repos/zpao/react/forks","keys_url":"https://api.github.com/repos/zpao/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zpao/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zpao/react/teams","hooks_url":"https://api.github.com/repos/zpao/react/hooks","issue_events_url":"https://api.github.com/repos/zpao/react/issues/events{/number}","events_url":"https://api.github.com/repos/zpao/react/events","assignees_url":"https://api.github.com/repos/zpao/react/assignees{/user}","branches_url":"https://api.github.com/repos/zpao/react/branches{/branch}","tags_url":"https://api.github.com/repos/zpao/react/tags","blobs_url":"https://api.github.com/repos/zpao/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zpao/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zpao/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/zpao/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zpao/react/statuses/{sha}","languages_url":"https://api.github.com/repos/zpao/react/languages","stargazers_url":"https://api.github.com/repos/zpao/react/stargazers","contributors_url":"https://api.github.com/repos/zpao/react/contributors","subscribers_url":"https://api.github.com/repos/zpao/react/subscribers","subscription_url":"https://api.github.com/repos/zpao/react/subscription","commits_url":"https://api.github.com/repos/zpao/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/zpao/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/zpao/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/zpao/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/zpao/react/contents/{+path}","compare_url":"https://api.github.com/repos/zpao/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zpao/react/merges","archive_url":"https://api.github.com/repos/zpao/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zpao/react/downloads","issues_url":"https://api.github.com/repos/zpao/react/issues{/number}","pulls_url":"https://api.github.com/repos/zpao/react/pulls{/number}","milestones_url":"https://api.github.com/repos/zpao/react/milestones{/number}","notifications_url":"https://api.github.com/repos/zpao/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zpao/react/labels{/name}","releases_url":"https://api.github.com/repos/zpao/react/releases{/id}","deployments_url":"https://api.github.com/repos/zpao/react/deployments","created_at":"2013-05-30T03:56:14Z","updated_at":"2016-02-15T14:49:17Z","pushed_at":"2016-04-14T21:03:38Z","git_url":"git://github.com/zpao/react.git","ssh_url":"git@github.com:zpao/react.git","clone_url":"https://github.com/zpao/react.git","svn_url":"https://github.com/zpao/react","homepage":"http://facebook.github.io/react/","size":86244,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"6a8c7518d39d8f1a03543e23aa0c6060a44772e6","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":10270250,"name":"react","full_name":"facebook/react","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":false,"url":"https://api.github.com/repos/facebook/react","forks_url":"https://api.github.com/repos/facebook/react/forks","keys_url":"https://api.github.com/repos/facebook/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react/teams","hooks_url":"https://api.github.com/repos/facebook/react/hooks","issue_events_url":"https://api.github.com/repos/facebook/react/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react/events","assignees_url":"https://api.github.com/repos/facebook/react/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react/tags","blobs_url":"https://api.github.com/repos/facebook/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react/languages","stargazers_url":"https://api.github.com/repos/facebook/react/stargazers","contributors_url":"https://api.github.com/repos/facebook/react/contributors","subscribers_url":"https://api.github.com/repos/facebook/react/subscribers","subscription_url":"https://api.github.com/repos/facebook/react/subscription","commits_url":"https://api.github.com/repos/facebook/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react/merges","archive_url":"https://api.github.com/repos/facebook/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react/downloads","issues_url":"https://api.github.com/repos/facebook/react/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/react/deployments","created_at":"2013-05-24T16:15:54Z","updated_at":"2016-04-14T20:58:07Z","pushed_at":"2016-04-14T21:03:43Z","git_url":"git://github.com/facebook/react.git","ssh_url":"git@github.com:facebook/react.git","clone_url":"https://github.com/facebook/react.git","svn_url":"https://github.com/facebook/react","homepage":"https://facebook.github.io/react/","size":105029,"stargazers_count":40393,"watchers_count":40393,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6755,"mirror_url":null,"open_issues_count":519,"forks":6755,"open_issues":519,"watchers":40393,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/6519"},"html":{"href":"https://github.com/facebook/react/pull/6519"},"issue":{"href":"https://api.github.com/repos/facebook/react/issues/6519"},"comments":{"href":"https://api.github.com/repos/facebook/react/issues/6519/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react/pulls/6519/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react/pulls/6519/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react/statuses/d513f3287611ff91178f2667866078f7d56b7df1"}}}}