by doesnt_know · 12y ago · 0 comments
You are just flat out wrong to say that projects don't say to install globally. Just after a super fast search of some well known packages:
Express npm install -g express-generator@3 https://www.npmjs.org/package/express
Mocha $ npm install -g mocha http://visionmedia.github.io/mocha/#installation
node jslint npm install jslint -g https://github.com/reid/node-jslint
Yeoman npm install -g yo http://yeoman.io/
Bower npm install -g bower http://bower.io/
JSHint $ npm install jshint -g http://www.jshint.com/docs/
Grunt npm install -g grunt-cli http://gruntjs.com/getting-started
Everything in that list.
You conveniently ignore that the express guide tells you to add express to its package file, express-generator is a separate utility. No one installs libraries globally.
Even if you completely ignore the security issues (which was my entire argument to begin with that you ignored). "Globally available" in this context really just means "put in your PATH", which can easily be accomplished without giving a bunch of random javascript tools root access to the machine.