npm/npm — pull request #4791 by davglass (2014-02-27 14:19:42+00:00)
Title: Added support for install --development

This basically installs the packages that `npm prune --production` would remove.

Use case:

In a CI environment, I need to:

* install production dependencies
* analyze them and their size
* display any warnings or helpful information
* install the devDependencies
* run their tests
* prune --production
* package for deployment

Now, I could do a `--production` install, then install without but I actually want to "switch" registries in between these. I only want "production" dependencies installed from a private local registry, but devDependencies can come from anywhere as they will be deleted with a prune. If a production dependency isn't in my local registry, it should 404 but doing a two pass install without scoping it would let it install anyway and then `prune` wouldn't work as I would expect.

I couldn't get all the tests to run on any of my dev machines from master or this branch, but I did add 7 passing tests for this functionality:

```
./node_modules/.bin/tap ./test/tap/install-development.js ./test/tap/install-production.js
ok ./test/tap/install-development.js .................... 4/4
ok ./test/tap/install-production.js ..................... 3/3
total ................................................... 7/7
ok
```