title: How to build to output folder when the typescript files are located in './src'
body: <p>What I have:</p>
  
  <pre><code>./src/myfile.ts
  ./test/mytest.spec.ts
  </code></pre>
  
  <p>And <strong>tsc</strong> should create a javascript (<code>myfile.js</code>) and definition file (<code>myfile.d.ts</code>) in the <code>./build</code> location.</p>
  
  <p>My tsconfig.ts:</p>
  
  <pre><code>{
    "compilerOptions": {
      "module": "commonjs",
      "target": "es6",
      "noImplicitAny": false,
      "rootDir": ".",
      "outDir": "./build",
      "sourceMap": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "moduleResolution": "node",
      "declaration": true
    },
    "files": [
      "./src/index.ts"
    ],
    "exclude": [
      ".vscode",
      ".git",
      "build",
      "node_modules",
      "test"
    ],
    "compileOnSave": false,
    "buildOnSave": false,
    "atom": {
      "rewriteTsconfig": false
    }
  }
  </code></pre>
  
  <p>But this config file generates the <code>myfile.js</code> in the <code>./build/src/</code> sub-folder.</p>
  
  <p>Note that I cannot use <code>"rootDir": "./src"</code> because then the test folder is not compiled (which gives problems when running tests with karma + webpack?)</p>