kotas/gulp-tsc — pull request #7 by kotas (2014-02-14 06:35:38+00:00)
Title: Change the strategy for handling output files

By facing issue #6, we should have managed files referenced by compile targets, because they are also compiled implicitly.

This PR changes how we handle output files.

We give --outDir option to tsc with a temporary directory path so that all files generated by tsc command go to the directory, and we can manage them properly. No more "mark and sweep" is needed.

However, this has a side-effect that causes sourcemap files to have unsolvable relative path to the source files.

So we add sourceRoot option and outDir option to manage with this problem. sourceRoot option makes paths in sourcemap files absolute, and outDir option is a hint for Compiler where the output files are going to, so that it can correct paths in sourcemap.