joonhocho/tscpaths

Watch mode support

bobmoff opened this issue · 2 comments

Does it work in watch mode?

@joonhocho -- would like to know this too, any thoughts?

@bobmoff / @tomspeak - if you haven't got this working yet (and for anyone else in future)

Got watch mode working with a package called tsc-watch (see here).

Works like so: tsc-watch --onSuccess "tscpaths -p tsconfig.json -s ./src -o ./dist"

tsc-watch simply extends tsc and offers additional functionality such as onSuccess, onFailure, etc

tsc-watch's --onSuccess method is called on every successful compile, or you can alternatively use --onFirstSuccess to run on the first successful compile only