The getting started for gulp is:
npm install --global gulp
npm install --save-dev gulp
I understand the first install is to install the binary in global path, but ..
- what is the point of the 2nd install?
- can't it be also global?
It's meant for version/dependency control. For example, lets say you have a project that uses version 1.0.1 of a gulp plugin.
But what happens if a person wants to fork that project from github, packagist or wherever?
They might have the same plugin installed globally on their system but the version is 2.0.1 Assuming the plugin uses standard semantics on version control the only time you increment the first number is when the changes may cause breaks in other dependencies when compared to the previous versions.
Instead of using the new 2.0.1 version in the project that causes breaks / errors by including the dev version (1.0.1) in the repository (project) you eliminate this problem