Sublime Forum

SublimeText 2 + TextScript Compiler

#1

I’ve installed the TypeScript Compiler and Node.JS, imported the language file, and created a build-system. Everything works fine when I press CTRL-ALT-Y to compile their Greeter.ts to .js. However, if I try to comipile a .ts that uses ES5 commands (in my case, accessors/getters/setters), I get the following error:

*** Your TypeScript compiler is not properly configured. ***
*** Check your Preferences (menu ‘Preferences/Package Settings/TypeScript Compiler’) and retry. ***

W:/ts/jquery/parallax.ts(51,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
W:/ts/jquery/parallax.ts(55,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.

I’ve tried to modify my build system to look like this:
{
“cmd”: “tsc”,"–target", “ES5”, “$file”],
“file_regex”: “(.\.ts?)\s\(([0-9]+)\,([0-9]+)\)\:\s(…?)$”,
“selector”: “source.ts”,
“windows”: {
“cmd”: “C:\_SDKs\typescript\bin\tsc.cmd”, “$file”]
}
}

Adding in the “–target”, “ES5” to the “cmd” line, but it doesn’t seem to work.

Here is the compiler:
{
“node_path” : “C:\_SDKs\NodeJS\node.exe”,
“typescript_path” : “C:\_SDKs\typescript\bin\tsc”
}

Any advice you can provide would be greatly appreciated!

0 Likes