{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/comments/31286335","id":31286335,"diff_hunk":"@@ -0,0 +1,40 @@\n+import sublime_plugin\n+import sublime\n+import os\n+from ..libs.global_vars import IS_ST2\n+\n+\n+class TypescriptBuildCommand(sublime_plugin.WindowCommand):\n+    def run(self):\n+        file_name = self.window.active_view().file_name()\n+        directory = os.path.dirname(file_name)\n+        if \"tsconfig.json\" in os.listdir(directory):","path":"typescript/commands/build.py","position":11,"original_position":11,"commit_id":"b7ca53901e18cd63503b5400a87fc3967ec54765","original_commit_id":"b7ca53901e18cd63503b5400a87fc3967ec54765","user":{"login":"zhengbli","id":1171301,"avatar_url":"https://avatars.githubusercontent.com/u/1171301?v=3","gravatar_id":"","url":"https://api.github.com/users/zhengbli","html_url":"https://github.com/zhengbli","followers_url":"https://api.github.com/users/zhengbli/followers","following_url":"https://api.github.com/users/zhengbli/following{/other_user}","gists_url":"https://api.github.com/users/zhengbli/gists{/gist_id}","starred_url":"https://api.github.com/users/zhengbli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhengbli/subscriptions","organizations_url":"https://api.github.com/users/zhengbli/orgs","repos_url":"https://api.github.com/users/zhengbli/repos","events_url":"https://api.github.com/users/zhengbli/events{/privacy}","received_events_url":"https://api.github.com/users/zhengbli/received_events","type":"User","site_admin":false},"body":"There is no existing command on the server side to provide project info. However, I do think we need to create one for not only this and future features like project-wide error listing etc. I'll send a PR to the typescript repo soon ","created_at":"2015-05-28T22:59:56Z","updated_at":"2015-05-28T22:59:56Z","html_url":"https://github.com/Microsoft/TypeScript-Sublime-Plugin/pull/210#discussion_r31286335","pull_request_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/210","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/comments/31286335"},"html":{"href":"https://github.com/Microsoft/TypeScript-Sublime-Plugin/pull/210#discussion_r31286335"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/210"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/210","id":36368059,"html_url":"https://github.com/Microsoft/TypeScript-Sublime-Plugin/pull/210","diff_url":"https://github.com/Microsoft/TypeScript-Sublime-Plugin/pull/210.diff","patch_url":"https://github.com/Microsoft/TypeScript-Sublime-Plugin/pull/210.patch","issue_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/issues/210","number":210,"state":"open","locked":false,"title":"Add build module","user":{"login":"zhengbli","id":1171301,"avatar_url":"https://avatars.githubusercontent.com/u/1171301?v=3","gravatar_id":"","url":"https://api.github.com/users/zhengbli","html_url":"https://github.com/zhengbli","followers_url":"https://api.github.com/users/zhengbli/followers","following_url":"https://api.github.com/users/zhengbli/following{/other_user}","gists_url":"https://api.github.com/users/zhengbli/gists{/gist_id}","starred_url":"https://api.github.com/users/zhengbli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhengbli/subscriptions","organizations_url":"https://api.github.com/users/zhengbli/orgs","repos_url":"https://api.github.com/users/zhengbli/repos","events_url":"https://api.github.com/users/zhengbli/events{/privacy}","received_events_url":"https://api.github.com/users/zhengbli/received_events","type":"User","site_admin":false},"body":"Adding support for building loose ts files & projects with ``tsconfig.json``.\r\nNote: on mac it is required to install the [``Fix Mac Path``](https://github.com/int3h/SublimeFixMacPath) for the build command to work. Otherwise the build command will not be found.\r\n\r\nBehavior:\r\nThe build command is invoked by ``ctrl + b``, or by menu item ``Tools -> Build``\r\n- For loose ts files:\r\n  - First an input panel will pop up for the user to input [compiling options](https://github.com/Microsoft/TypeScript/wiki/Compiler-Options)\r\n  - Then the build result will show up in an output panel.\r\n- For project files with ``tsconfig.json`` file, the command will load the ``tsconfig`` file and compile accordingly. \r\n\r\nDemo:\r\n![test](https://cloud.githubusercontent.com/assets/1171301/7852014/47a52452-04ac-11e5-8e17-92469911a2ed.gif)\r\n\r\n\r\n\r\n\r\n","created_at":"2015-05-28T02:57:18Z","updated_at":"2015-05-28T22:59:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7ace5bce3189c2319cd1b527df7eb8039a0153d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/210/commits","review_comments_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/210/comments","review_comment_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/issues/210/comments","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/statuses/b7ca53901e18cd63503b5400a87fc3967ec54765","head":{"label":"zhengbli:addBuildModule","ref":"addBuildModule","sha":"b7ca53901e18cd63503b5400a87fc3967ec54765","user":{"login":"zhengbli","id":1171301,"avatar_url":"https://avatars.githubusercontent.com/u/1171301?v=3","gravatar_id":"","url":"https://api.github.com/users/zhengbli","html_url":"https://github.com/zhengbli","followers_url":"https://api.github.com/users/zhengbli/followers","following_url":"https://api.github.com/users/zhengbli/following{/other_user}","gists_url":"https://api.github.com/users/zhengbli/gists{/gist_id}","starred_url":"https://api.github.com/users/zhengbli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhengbli/subscriptions","organizations_url":"https://api.github.com/users/zhengbli/orgs","repos_url":"https://api.github.com/users/zhengbli/repos","events_url":"https://api.github.com/users/zhengbli/events{/privacy}","received_events_url":"https://api.github.com/users/zhengbli/received_events","type":"User","site_admin":false},"repo":{"id":33347897,"name":"TypeScript-Sublime-Plugin","full_name":"zhengbli/TypeScript-Sublime-Plugin","owner":{"login":"zhengbli","id":1171301,"avatar_url":"https://avatars.githubusercontent.com/u/1171301?v=3","gravatar_id":"","url":"https://api.github.com/users/zhengbli","html_url":"https://github.com/zhengbli","followers_url":"https://api.github.com/users/zhengbli/followers","following_url":"https://api.github.com/users/zhengbli/following{/other_user}","gists_url":"https://api.github.com/users/zhengbli/gists{/gist_id}","starred_url":"https://api.github.com/users/zhengbli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhengbli/subscriptions","organizations_url":"https://api.github.com/users/zhengbli/orgs","repos_url":"https://api.github.com/users/zhengbli/repos","events_url":"https://api.github.com/users/zhengbli/events{/privacy}","received_events_url":"https://api.github.com/users/zhengbli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zhengbli/TypeScript-Sublime-Plugin","description":"IO wrapper around TypeScript language services, allowing for easy consumption by editor plugins","fork":true,"url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin","forks_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/forks","keys_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/teams","hooks_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/hooks","issue_events_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/issues/events{/number}","events_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/events","assignees_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/assignees{/user}","branches_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/branches{/branch}","tags_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/tags","blobs_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/languages","stargazers_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/stargazers","contributors_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/contributors","subscribers_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/subscribers","subscription_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/subscription","commits_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/contents/{+path}","compare_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/merges","archive_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/downloads","issues_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/issues{/number}","pulls_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/labels{/name}","releases_url":"https://api.github.com/repos/zhengbli/TypeScript-Sublime-Plugin/releases{/id}","created_at":"2015-04-03T05:27:33Z","updated_at":"2015-05-06T22:08:06Z","pushed_at":"2015-05-28T02:53:13Z","git_url":"git://github.com/zhengbli/TypeScript-Sublime-Plugin.git","ssh_url":"git@github.com:zhengbli/TypeScript-Sublime-Plugin.git","clone_url":"https://github.com/zhengbli/TypeScript-Sublime-Plugin.git","svn_url":"https://github.com/zhengbli/TypeScript-Sublime-Plugin","homepage":null,"size":30323,"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":"Microsoft:master","ref":"master","sha":"2f32d32233446bc0785bc489c405d204952ffa5b","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":28059353,"name":"TypeScript-Sublime-Plugin","full_name":"Microsoft/TypeScript-Sublime-Plugin","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/TypeScript-Sublime-Plugin","description":"IO wrapper around TypeScript language services, allowing for easy consumption by editor plugins","fork":false,"url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin","forks_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/forks","keys_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/teams","hooks_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/events","assignees_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/tags","blobs_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/languages","stargazers_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/subscription","commits_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/merges","archive_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/downloads","issues_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/releases{/id}","created_at":"2014-12-15T22:30:20Z","updated_at":"2015-05-28T12:53:43Z","pushed_at":"2015-05-28T02:57:19Z","git_url":"git://github.com/Microsoft/TypeScript-Sublime-Plugin.git","ssh_url":"git@github.com:Microsoft/TypeScript-Sublime-Plugin.git","clone_url":"https://github.com/Microsoft/TypeScript-Sublime-Plugin.git","svn_url":"https://github.com/Microsoft/TypeScript-Sublime-Plugin","homepage":null,"size":32212,"stargazers_count":270,"watchers_count":270,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":36,"forks":14,"open_issues":36,"watchers":270,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/210"},"html":{"href":"https://github.com/Microsoft/TypeScript-Sublime-Plugin/pull/210"},"issue":{"href":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/issues/210"},"comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/issues/210/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/210/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/pulls/210/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/TypeScript-Sublime-Plugin/statuses/b7ca53901e18cd63503b5400a87fc3967ec54765"}}}}