title: How to conditionally delete generated javascript files?
body: <p><p>   I'm working with Intellij, which by default transpiles typescript files into js files in the same dir as the typescript source (so transpiling foo.ts produces foo.js).  However, I also have some javascript files that are source files (not generated from typescript) that I don't want to inadvertently delete.</p>
  
  <p><strong>Example</strong>:</p>
  
  <pre><code>   someDir\foo.ts          // original ts source file
     someDir\foo.js          // generated by intellij tsc compile, should be deleted
     someDir\bar.js          // original js sourcefile, should NOTbe deleted!
  </code></pre>
  
  <p><strong>Question</strong>: <br>
  I'd like to delete all **/*.js files that have a matching **/*.ts file - in the example above, I'd like to delete foo.js (as it has corresponding foo.ts) but not delete bar.js.  Is there some gulp.src pattern that specify can be used to specify 'all **/*.js files that have a matching **/*.ts file'?  If so, I can just pipe the resulting src stream to del.</p>
  
  <p>Thanks,<br>
  Brad</p>
  
  <p><p>p.s. And I know I can do some advanced Intellij typescript configuration to move the location of the generated js files, but I'd rather work with them in their default location.  Another workaround would be to explicitly exclude the 'source js' files in the source stream (with !), but I'd rather do it with a pattern as it is less brittle.</p>