Last active
December 14, 2015 03:29
-
-
Save simoneb/5021925 to your computer and use it in GitHub Desktop.
TypeScript - Sublime Text2 build system configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 - Copy the file typescript.sublime-build in %appdata%\Sublime Text 2\Packages\User | |
2 - Edit a .ts file | |
- CTRL+B will compile to .js and save to the same path as the .ts file | |
- CTRL+SHIFT+B will compile to .js and create+run an HTML page which embeds the script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"cmd": ["tsc.exe", "$file"], | |
"selector": "source.ts", | |
"variants": [ | |
{ | |
"cmd": ["tsc.exe", "--exec", "$file"], | |
"name": "Run standalone" | |
}, | |
{ | |
"cmd": ["echo ^<!DOCTYPE html^>^<html^>^<head^>^<title^>TypeScript - $file_base_name^</title^>^</head^>^<body^>^<script src='file://$file_path/$file_base_name.js'^>^</script^>^</body^>^</html^>", | |
">", | |
"%temp%/typescript_$file_base_name.html", | |
"&&", | |
"tsc.exe", | |
"$file", | |
"&&", | |
"start", | |
"%temp%/typescript_$file_base_name.html"], | |
"name": "Run", | |
"shell": true | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment