I want to add some my ideas as
I think all differents will appear when someone use your codes instead of using by yourself
For example, you write a HTTP library called node's request
In your library,
you used lodash to handle string and object, without lodash, your codes cannot run
If someone use your HTTP library as a part of his codes. Your codes will be compiled with his.
your codes need lodash, So you need put in dependencies
to compile
If you write a project like monaco-editor
, which is a web editor,
you have bundle all your codes and your product env library
using webpack, when build completed, only have a monaco-min.js
So someone don't case whether --save
or --save-dependencies
, only he need is monaco-min.js
Summary:
If someone want to compile your codes (use as library),
put lodash
which used by your codes into dependencies
If someone want add more feature to your codes, he need unit test
and compiler
, put these into dev-dependencies