title: Force npm install to install optional dependencies for other platforms
body: <p>I'm building a build task for Visual Studio Team Services. In this task I'm using <code>7zip-bin</code> to package the binary for 7zip for linux, mac and windows.</p>
  
  <p>This is all nice and it would work if I had the ability to deploy just the package.json to the build server, but no... A build task contains all its dependencies at build time.</p>
  
  <p>Is there a way I can force npm to download all OS optional packages somehow? Or will I have to download the file myself during build and extract it?</p>
  
  <p>Right now I'm using</p>
  
  <pre><code>npm install 7zip-bin --save
  </code></pre>
  
  <p>Which results in:</p>
  
  <pre><code>C:\temp&gt;npm install
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-linux@^1.0.3 (node_modules\7zip-bin\node_modules\7zip-bin-linux):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-linux@1.0.3: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@^1.0.1 (node_modules\7zip-bin\node_modules\7zip-bin-mac):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  </code></pre>
  
  <p>installing each optional package directly isn't possible, when I run</p>
  
  <pre><code>npm install 7zip-bin-linux --save
  </code></pre>
  
  <p>on a windows machine, the install is skipped and I get a EBADPLATFORM error.</p>
  
  <p>I understand I can't <strong>run</strong> these on my machine, but I need to package them in a <code>vsix</code> file (a glorified zip) so I can use them when my build task is running on these other platforms.</p>