Just working away on learning Node and Vuejs. I was wondering what other coders do out there as good practice.
Do you type out the package names and versions you need in the package.json file and then do $npm install or do you just $npm install <packagename> and then adjust the version as needed?
npm install <packagename> (or npm install <packagename> -D if it’s a dev dependency), just adjust the version if that is really important (or type it out it it’s a non-npm dependency, eg it comes from Github). npm update to update if necessary. Because NPM packages are by convention very small, you generally need lots of them, so manually typing into the package.json is likely to be error-prone.
I was typing out a long package file and was wondering if other people just do $npm install <packagename> because it seems faster on top of being more accurate as you said.