As of npm 5.0.0, installed modules are added as a dependency by default, so the --save option is no longer needed. The other save options still exist and are listed in the documentation for npm install.
Original Answer:-
To add package in dependencies:
npm install my_dep --save
or
npm install my_dep -S
or
npm i my_dep -S
To add package in devDependencies
npm install my_test_framework --save-dev
or
npm install my_test_framework -D
or
npm i my_test_framework -D