title: Configure WebStorm/PhpStorm to compile .ts files to .js into "js" folder
body: <p>I use <strong>WebStorm</strong> and I have a project with the following structure:</p>
  
  <pre><code>webApp
  |--style
  |--includes
  |--ts
  |--js
  </code></pre>
  
  <p>Where "<strong>webApp</strong>" is the project's root.</p>
  
  <p>I'd like to configure a File Watcher that compile the .ts file within the "<strong>ts</strong>" folder into .js files within the "<strong>js</strong>" folder. </p>
  
  <p>In the watcher dialog I set:</p>
  
  <pre><code>"$Projectpath$/js/ --sourcemap $FileName$"
  </code></pre>
  
  <p>in the <strong>arguments</strong> field and</p>
  
  <pre><code>"$Projectpath$/js/$FileNameWithoutExtension$.js:$Projectpath$/js/$FileNameWithoutExtension$.js.map"
  </code></pre>
  
  <p>in the <strong>Output paths to refresh</strong> field.</p>
  
  <p>every time I edit a .ts file webstorm shows an error like this:</p>
  
  <pre><code>/usr/local/bin/tsc /htdocs/webapp/js/ --sourcemap test.ts
  
  error TS6053: File '/htdocs/webapp/js/.ts' not found.
  </code></pre>
  
  <p>I tried several time to change the macros to point to the external <strong>js</strong> folder but the only way in witch it worked was letting the default option thus the transpiler compile the .ts file that became a 'node' witch contain the .js file and the .map file.</p>
  
  <p>Is there a way to accomplish my purpose?</p>