title: How to have npm install a typescript dependency from a GitHub url?
body: <p>Consider the following scenario:</p>
  
  <ul>
  <li>There is a code library.  The library is written in TypeScript and the typescript code is published in GitHub.  The <code>package.json</code> file has a build script which creates JavaScript files based on the TypeScript code and a publish script which then places the resulting JS files on npm.</li>
  <li>I make a fork of the GitHub repo, make some modifications to the typescript files and push those changes to GitHub.  (I also open a PR to the original GitHub repo but there is a time lage before these changes can be merged.)</li>
  <li>I wish to consume these code changes in a downstream NPM package so in the downstream packages I change the reference (in the downstream's <code>package.json</code> file) to the modified package to the GitHub URL of my fork and do an <code>npm install</code>.</li>
  </ul>
  
  <p>This doesn't work because:</p>
  
  <ul>
  <li>The package.json file of the modified package does not list the typescript files in the <code>dist</code> field, only the automatically generated JS files so the TypeScript files are not pulled during the npm install.</li>
  <li>The compiled JS files aren't present since they aren't checked in to GitHub.</li>
  </ul>
  
  <p>How can I solve this? Is there a way that I can modify the behavoir of <code>npm install</code> so that it fetches files in the repo that aren't in <code>dist</code> and then runs the build script during the install?</p>