title: Conditionally Include Dependency package.json
body: <p>I have a dependency that is only needed for Mac OS in an npm project and was wondering if there is some way to conditionally include this dependency only when the compatible platform is the one running <code>npm install</code>.</p>
  
  <p>I'm willing to write the logic for this.  In the below case <code>grunt-appdmg</code> is causing the npm install process to error out (for fairly obvious reasons) with: </p>
  
  <pre><code>'/dev/cuttle/node_modules/grunt-appdmg/node_modules/appdmg/node_modules/ds-store/node_modules/macos-alias/build'
    CXX(target) Release/obj.target/volume/src/volume.o
  ../src/volume.cc:9:2: error: #error This platform is not implemented yet
   #error This platform is not implemented yet
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>{
    "name": "Cuttle",
    "homepage": "https://github.com/oakmac/cuttle",
    "license": "MIT",
    "repository": {
      "type": "git",
      "url": "https://github.com/oakmac/cuttle.git"
    },
    "dependencies": {
      "fs-extra": "0.16.3",
      "open": "0.0.5",
      "winston": "0.8.3"
    },
    "devDependencies": {
      "grunt": "0.4.5",
      "grunt-contrib-less": "0.11.4",
      "grunt-contrib-watch": "0.6.1",
      "grunt-curl": "2.0.3",
      "grunt-download-atom-shell": "0.10.0",
      "grunt-appdmg": "0.2.0",
      "winresourcer": "0.9.0",
      "moment": "2.9.0",
      "shelljs": "0.3.0"
    }
  }
  </code></pre>