title: Is it possible to compile a single TypeScript file to an output path using the tsc command?
body: <p>In an attempt to separate my .ts source files from the .js output, I'm trying to implement a formal file-watcher in TypeScript and it seems as though the ability to specify an output path for a single file does not exist.  </p>
  
  <p>The flow, just to be clear:  I begin watching my entire <code>src</code> directory, make a change to, say, <code>src/views/HomeView.ts</code>, and i want node to pick up that the file has been changed, and move the compiled version to <code>public/js/views/HomeView.js</code>.  </p>
  
  <p>Using <code>tsc myfile.ts --out myfile.js</code> it travels through all of the modules and compiles each in the same path that the .ts file exists, without placing the final file(s) in the properly specified path.  It <em>does</em> however create an empty file where I would like it to end up.</p>
  
  <p>I'm wondering:  </p>
  
  <p>1)  Is it possible to use the <code>--out</code> parameter and <em>only</em> compile that one file?  I do not want it to traverse imports and compile every single file, but merely do syntax / error checking at compile-time (and that's only a secondary requirement, not necessary); and </p>
  
  <p>2)  Is there a bug in the compiler that prevents it from properly combining / creating files?  Again, the final output in the <code>--out</code> path directive is empty, but a file is indeed created.    </p>
  
  <p>Any help would be appreciated.  </p>
  
  <p><strong>* Update *</strong></p>
  
  <p>While I don't want to close this question as I do believe it's still an issue, I went ahead and implemented the core TypeScript compiler to achieve what I needed to do, bypassing <code>tsc</code> altogether.  Please see <a href="https://github.com/damassi/TypeScript-Watcher">https://github.com/damassi/TypeScript-Watcher</a> for more information and usage.  </p>