task - VS Code: watch typescript on save file -


in visual studio code, have following code in code in tsconfig.json

{     "version": "1.6.0",     "compileroptions": {         "target": "es5",         "module": "commonjs",         "sourcemap": true,         "watch": true,         "experimentalasyncfunctions": true,         "isolatedmodules": false,         "experimentaldecorators": true,         "emitdecoratormetadata": true,         "declaration": false,         "noimplicitany": false,         "removecomments": true,         "nolib": false,         "preserveconstenums": true,         "suppressimplicitanyindexerrors": true     },     ... } 

as can see, watch option @ true. well, isn't enough compile .ts file .js atom-typescript does. basically, new compiled .js should in same directory of .ts file when saving .ts.

also, i'd avoid using gulp in root project, since use gulpfile.coffee other means. has clue?

with recent versions of vs code 1.7.2 , typescript 2.0.10 need have following code in .vscode/tasks.json

{     "version": "0.1.0",     "command": "tsc",     "isshellcommand": true,     "args": ["-w", "-p", "."],     "showoutput": "silent",     "iswatching": true,     "problemmatcher": "$tsc-watch" } 

the watch option in tsconfig.json not needed.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -