title: Server & client-side TypeScript project organization, compilation
body: <p>How can I compile my TypeScript project what</p>
  
  <ul>
  <li>Shares code between server &amp; client</li>
  <li>Uses TypeScript</li>
  </ul>
  
  <p>I couldn't get webpack working, the website just shows a very basic getting started. I tried gulp, but it was far too complex and the incremental compilation took a very long time (way more than it should need).</p>
  
  <pre><code>src/
      common/
          data.ts
          [other files that are needed on both client and server-side]
      server/
          server.ts
          search.ts
      client/
          sw.ts
          resources/
               [other static resources like index.html]
  [configuration files like package.json]
  </code></pre>
  
  <p>How can I do it? What should I use?</p>
  
  <p><strong>EDIT:</strong> </p>
  
  <p>With gulp, I used gulp-typescript and tsify but the incremental compilation took more than 5 seconds, which was way too much.</p>