title: How can I whitelist a single file in a directory in .npmignore?
body: <p>I'm trying to make <code>npm</code> download only a single file in a directory on <code>npm install</code> of the package.</p>
  
  <p>The directory looks like:</p>
  
  <pre><code>+- dist/
     +- 1.0.0/
     +- 1.0.1/
     +- ...lots of other dirs...
     +- file.js
  </code></pre>
  
  <p>I want npm to ignore everything but <code>file.js</code> so I tried including the following in my <code>.npmignore</code>:</p>
  
  <pre><code>dist/
  !dist/file.js
  </code></pre>
  
  <p>Yet, npm will still download all the directories in <code>dist</code> when I install the package. I thought this was supposed to work like <code>.gitignore</code> but apparently I am missing something here.</p>