0

When using tsc with a tsconfig.json file, is there a check we can use to determine if the source files have been updated since the destination files have been written?

I want to run something like:

tsc --check && node .

that way I am ensuring that the latest transpilation has occurred. For small projects, I suppose just running tsc is enough, but for bigger projects that might take too long.

tsc --check would just make sure all the files made it to the target directory and have timestamps newer than the source files.

Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
  • Do you actually transpile the files on production? If so, that seems like anti pattern. If not, you might consider using `ts-node` to serve from the sources and skip compiling. – naeramarth7 May 07 '19 at 14:11
  • no I am checking to see if they are transpiled correctly, w/o transpiling them :) – Alexander Mills May 07 '19 at 16:48

0 Answers0