As it's assumed that e.g. grunt-cli is installed globally, listing it as a dependency in package.json
a) causes an unnecessary download and local install, b) doesn't actually affect the kind of warnings/errors thrown if grunt-cli isn't installed. Is there some other way using npm/package.json that I can specify that grunt-cli is required?
Asked
Active
Viewed 102 times
1

wheresrhys
- 22,558
- 19
- 94
- 162
-
1The best place for that is readme. After all, the user needs to read it to know, that he is supposed to run some global utilities at all. – vkurchatkin Nov 19 '13 at 20:58
-
I had a feeling something like that would be the answer. I guess this is seen as out of scope for dependency managers (If it can't load the dependency, why mention it) although I think *a* role of package.json is to communicate metadata about the application, so there's a case to include an extra property detailing which binaries are assumed. `engines` does this for node and npm - maybe its use case should be broadened. – wheresrhys Nov 20 '13 at 10:20
-
well, i think you can use this field, nothing bad will happen. npm actually manages command-line dependencies, which are accessible through npm scripts, but it involves downloading them on npm install. It can make initial installs long, but otherwise it is a good thing. – vkurchatkin Nov 20 '13 at 10:37